Skip to content

Commit

Permalink
Move webkit/child/webthemeengine_impl_* to content/child/
Browse files Browse the repository at this point in the history
BUG=338338

Review URL: https://codereview.chromium.org/150463002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@248292 0039d316-1c4b-4281-b951-d872f2087c98
  • Loading branch information
pilgrim@chromium.org committed Jan 31, 2014
1 parent 3194699 commit 3d4a906
Show file tree
Hide file tree
Showing 11 changed files with 65 additions and 73 deletions.
10 changes: 5 additions & 5 deletions content/child/webkitplatformsupport_child_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@
#include "webkit/child/webkitplatformsupport_impl.h"

#if defined(USE_DEFAULT_RENDER_THEME)
#include "webkit/child/webthemeengine_impl_default.h"
#include "content/child/webthemeengine_impl_default.h"
#elif defined(OS_WIN)
#include "webkit/child/webthemeengine_impl_win.h"
#include "content/child/webthemeengine_impl_win.h"
#elif defined(OS_MACOSX)
#include "webkit/child/webthemeengine_impl_mac.h"
#include "content/child/webthemeengine_impl_mac.h"
#elif defined(OS_ANDROID)
#include "webkit/child/webthemeengine_impl_android.h"
#include "content/child/webthemeengine_impl_android.h"
#endif

namespace webkit_glue {
Expand Down Expand Up @@ -64,7 +64,7 @@ class CONTENT_EXPORT WebKitPlatformSupportChildImpl :
private:
static void DestroyCurrentThread(void*);

webkit_glue::WebThemeEngineImpl native_theme_engine_;
WebThemeEngineImpl native_theme_engine_;
webkit_glue::WebFallbackThemeEngineImpl fallback_theme_engine_;
base::ThreadLocalStorage::Slot current_thread_slot_;
scoped_ptr<webkit_glue::FlingCurveConfiguration> fling_curve_configuration_;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "webkit/child/webthemeengine_impl_android.h"
#include "content/child/webthemeengine_impl_android.h"

#include "base/logging.h"
#include "skia/ext/platform_canvas.h"
Expand All @@ -15,7 +15,7 @@ using blink::WebColor;
using blink::WebRect;
using blink::WebThemeEngine;

namespace webkit_glue {
namespace content {

static ui::NativeTheme::Part NativeThemePart(
WebThemeEngine::Part part) {
Expand Down Expand Up @@ -175,4 +175,4 @@ void WebThemeEngineImpl::paint(
gfx::Rect(rect),
native_theme_extra_params);
}
} // namespace webkit_glue
} // namespace content
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef WEBKIT_CHILD_WEBTHEMEENGINE_IMPL_ANDROID_H_
#define WEBKIT_CHILD_WEBTHEMEENGINE_IMPL_ANDROID_H_
#ifndef CONTENT_CHILD_WEBTHEMEENGINE_IMPL_ANDROID_H_
#define CONTENT_CHILD_WEBTHEMEENGINE_IMPL_ANDROID_H_

#include "third_party/WebKit/public/platform/default/WebThemeEngine.h"
#include "webkit/child/webkit_child_export.h"

namespace webkit_glue {
namespace content {

class WEBKIT_CHILD_EXPORT WebThemeEngineImpl : public blink::WebThemeEngine {
class WebThemeEngineImpl : public blink::WebThemeEngine {
public:
// WebThemeEngine methods:
virtual blink::WebSize getSize(blink::WebThemeEngine::Part);
Expand All @@ -22,6 +21,6 @@ class WEBKIT_CHILD_EXPORT WebThemeEngineImpl : public blink::WebThemeEngine {
const blink::WebThemeEngine::ExtraParams* extra_params);
};

} // namespace webkit_glue
} // namespace content

#endif // WEBKIT_CHILD_WEBTHEMEENGINE_IMPL_ANDROID_H_
#endif // CONTENT_CHILD_WEBTHEMEENGINE_IMPL_ANDROID_H_
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "webkit/child/webthemeengine_impl_default.h"
#include "content/child/webthemeengine_impl_default.h"

#include "skia/ext/platform_canvas.h"
#include "third_party/WebKit/public/platform/WebRect.h"
Expand All @@ -14,7 +14,7 @@ using blink::WebColor;
using blink::WebRect;
using blink::WebThemeEngine;

namespace webkit_glue {
namespace content {

static ui::NativeTheme::Part NativeThemePart(
WebThemeEngine::Part part) {
Expand Down Expand Up @@ -184,4 +184,4 @@ void WebThemeEngineImpl::paint(
native_theme_extra_params);
}

} // namespace webkit_glue
} // namespace content
Original file line number Diff line number Diff line change
@@ -1,18 +1,15 @@
// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef WEBKIT_CHILD_WEBTHEMEENGINE_IMPL_DEFAULT_H_
#define WEBKIT_CHILD_WEBTHEMEENGINE_IMPL_DEFAULT_H_
#ifndef CONTENT_CHILD_WEBTHEMEENGINE_IMPL_DEFAULT_H_
#define CONTENT_CHILD_WEBTHEMEENGINE_IMPL_DEFAULT_H_

#include "base/compiler_specific.h"
#include "third_party/WebKit/public/platform/default/WebThemeEngine.h"
#include "webkit/child/webkit_child_export.h"

namespace webkit_glue {
namespace content {

class WEBKIT_CHILD_EXPORT WebThemeEngineImpl :
NON_EXPORTED_BASE(public blink::WebThemeEngine) {
class WebThemeEngineImpl : public blink::WebThemeEngine {
public:
// WebThemeEngine methods:
virtual blink::WebSize getSize(blink::WebThemeEngine::Part);
Expand All @@ -24,6 +21,6 @@ class WEBKIT_CHILD_EXPORT WebThemeEngineImpl :
const blink::WebThemeEngine::ExtraParams* extra_params);
};

} // namespace webkit_glue
} // namespace content

#endif // WEBKIT_CHILD_WEBTHEMEENGINE_IMPL_DEFAULT_H_
#endif // CONTENT_CHILD_WEBTHEMEENGINE_IMPL_DEFAULT_H_
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "webkit/child/webthemeengine_impl_mac.h"
#include "content/child/webthemeengine_impl_mac.h"

#include <Carbon/Carbon.h>

Expand All @@ -14,7 +14,7 @@ using blink::WebCanvas;
using blink::WebRect;
using blink::WebThemeEngine;

namespace webkit_glue {
namespace content {

static ThemeTrackEnableState stateToHIEnableState(WebThemeEngine::State state) {
switch (state) {
Expand Down Expand Up @@ -58,4 +58,4 @@ void WebThemeEngineImpl::paintScrollbarThumb(
HIThemeDrawTrack(&trackInfo, 0, cgContext, kHIThemeOrientationNormal);
}

} // namespace webkit_glue
} // namespace content
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef WEBKIT_CHILD_WEBTHEMEENGINE_IMPL_MAC_H_
#define WEBKIT_CHILD_WEBTHEMEENGINE_IMPL_MAC_H_
#ifndef CONTENT_CHILD_WEBTHEMEENGINE_IMPL_MAC_H_
#define CONTENT_CHILD_WEBTHEMEENGINE_IMPL_MAC_H_

#include "third_party/WebKit/public/platform/mac/WebThemeEngine.h"
#include "webkit/child/webkit_child_export.h"

namespace webkit_glue {
namespace content {

class WEBKIT_CHILD_EXPORT WebThemeEngineImpl : public blink::WebThemeEngine {
class WebThemeEngineImpl : public blink::WebThemeEngine {
public:
// blink::WebThemeEngine implementation.
virtual void paintScrollbarThumb(
Expand All @@ -21,6 +20,6 @@ class WEBKIT_CHILD_EXPORT WebThemeEngineImpl : public blink::WebThemeEngine {
const blink::WebThemeEngine::ScrollbarInfo& extra_params);
};

} // namespace webkit_glue
} // namespace content

#endif // WEBKIT_CHILD_WEBTHEMEENGINE_IMPL_MAC_H_
#endif // CONTENT_CHILD_WEBTHEMEENGINE_IMPL_MAC_H_
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "webkit/child/webthemeengine_impl_win.h"
#include "content/child/webthemeengine_impl_win.h"

#include <vsstyle.h> // To convert to ui::NativeTheme::State

Expand All @@ -18,7 +18,7 @@ using blink::WebColor;
using blink::WebRect;
using blink::WebSize;

namespace webkit_glue {
namespace content {

static RECT WebRectToRECT(const WebRect& rect) {
RECT result;
Expand Down Expand Up @@ -1011,4 +1011,4 @@ WebSize WebThemeEngineImpl::getSize(int part) {
return WebSize();
}

} // namespace webkit_glue
} // namespace content
Original file line number Diff line number Diff line change
@@ -1,18 +1,15 @@
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef WEBKIT_CHILD_WEBTHEMEENGINE_IMPL_WIN_H_
#define WEBKIT_CHILD_WEBTHEMEENGINE_IMPL_WIN_H_
#ifndef CONTENT_CHILD_WEBTHEMEENGINE_IMPL_WIN_H_
#define CONTENT_CHILD_WEBTHEMEENGINE_IMPL_WIN_H_

#include "base/compiler_specific.h"
#include "third_party/WebKit/public/platform/win/WebThemeEngine.h"
#include "webkit/child/webkit_child_export.h"

namespace webkit_glue {
namespace content {

class WEBKIT_CHILD_EXPORT WebThemeEngineImpl :
NON_EXPORTED_BASE(public blink::WebThemeEngine) {
class WebThemeEngineImpl : public blink::WebThemeEngine {
public:
// WebThemeEngine methods:
virtual void paintButton(
Expand Down Expand Up @@ -47,6 +44,6 @@ class WEBKIT_CHILD_EXPORT WebThemeEngineImpl :
virtual blink::WebSize getSize(int part);
};

} // namespace webkit_glue
} // namespace content

#endif // WEBKIT_CHILD_WEBTHEMEENGINE_IMPL_WIN_H_
#endif // CONTENT_CHILD_WEBTHEMEENGINE_IMPL_WIN_H_
16 changes: 16 additions & 0 deletions content/content_child.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -159,12 +159,28 @@
'child/websocket_bridge.h',
'child/websocket_dispatcher.cc',
'child/websocket_dispatcher.h',
'child/webthemeengine_impl_android.cc',
'child/webthemeengine_impl_android.h',
'child/webthemeengine_impl_default.cc',
'child/webthemeengine_impl_default.h',
'child/webthemeengine_impl_mac.cc',
'child/webthemeengine_impl_mac.h',
'child/webthemeengine_impl_win.cc',
'child/webthemeengine_impl_win.h',
'child/worker_thread_task_runner.cc',
'child/worker_thread_task_runner.h',
'public/child/image_decoder_utils.h',
'public/child/resource_dispatcher_delegate.h',
],
'conditions': [
['use_default_render_theme==0',
{
'sources/': [
['exclude', 'child/webthemeengine_impl_default.cc'],
['exclude', 'child/webthemeengine_impl_default.h'],
],
}
],
['OS=="android"', {
'includes': [
'../build/android/cpufeatures.gypi',
Expand Down
16 changes: 0 additions & 16 deletions webkit/child/webkit_child.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -79,14 +79,6 @@
'websocketstreamhandle_delegate.h',
'websocketstreamhandle_impl.cc',
'websocketstreamhandle_impl.h',
'webthemeengine_impl_android.cc',
'webthemeengine_impl_android.h',
'webthemeengine_impl_default.cc',
'webthemeengine_impl_default.h',
'webthemeengine_impl_mac.cc',
'webthemeengine_impl_mac.h',
'webthemeengine_impl_win.cc',
'webthemeengine_impl_win.h',
'webthread_impl.cc',
'webthread_impl.h',
'weburlloader_impl.cc',
Expand All @@ -101,14 +93,6 @@
# TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
'msvs_disabled_warnings': [ 4267 ],
'conditions': [
['use_default_render_theme==0',
{
'sources/': [
['exclude', 'webthemeengine_impl_default.cc'],
['exclude', 'webthemeengine_impl_default.h'],
],
}
],
['OS=="mac"',
{
'link_settings': {
Expand Down

0 comments on commit 3d4a906

Please sign in to comment.