summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-09-12 20:55:53 +0000
committerben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-09-12 20:55:53 +0000
commitbde885b4e8cf11db7ba2af6c70a6580830a52e7a (patch)
tree7cb519bf772ed395b612ddabbe27d989ec44b958
parent9561605bc712063ba4ccb315c0a5cf5b0e3b221e (diff)
downloadchromium_src-bde885b4e8cf11db7ba2af6c70a6580830a52e7a.zip
chromium_src-bde885b4e8cf11db7ba2af6c70a6580830a52e7a.tar.gz
chromium_src-bde885b4e8cf11db7ba2af6c70a6580830a52e7a.tar.bz2
Move a bunch of windows stuff from ui/base/win to ui/gfx/win
R=sky@chromium.org BUG=103304 Review URL: https://codereview.chromium.org/23769011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@222860 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/about_flags.cc4
-rw-r--r--chrome/browser/chrome_browser_main.cc2
-rw-r--r--chrome/browser/chromeos/login/chrome_restart_request.cc4
-rw-r--r--chrome/browser/extensions/api/system_display/display_info_provider_win.cc2
-rw-r--r--chrome/browser/hang_monitor/hung_plugin_action.cc4
-rw-r--r--chrome/browser/metrics/metrics_log.cc2
-rw-r--r--chrome/browser/process_singleton_win.cc2
-rw-r--r--chrome/browser/ui/views/app_menu_button_win.cc4
-rw-r--r--chrome/browser/ui/views/frame/browser_desktop_root_window_host_win.cc2
-rw-r--r--chrome/browser/ui/views/frame/browser_frame_win.cc2
-rw-r--r--chrome/browser/ui/views/frame/glass_browser_frame_view.cc2
-rw-r--r--chrome/browser/ui/views/frame/minimize_button_metrics_win.cc2
-rw-r--r--chrome/browser/ui/views/infobars/infobar_view.cc4
-rw-r--r--chrome/browser/ui/views/omnibox/omnibox_view_win.cc4
-rw-r--r--chrome/browser/ui/views/simple_message_box_win.cc4
-rw-r--r--chrome/browser/ui/views/status_icons/status_tray_win.cc6
-rw-r--r--chrome/browser/ui/views/tabs/dragged_tab_view.cc2
-rw-r--r--chrome/browser/ui/views/tabs/tab_strip.cc4
-rw-r--r--content/app/content_main_runner.cc2
-rw-r--r--content/browser/plugin_service_impl.cc4
-rw-r--r--content/browser/renderer_host/backing_store_win.cc2
-rw-r--r--content/browser/renderer_host/render_process_host_impl.cc1
-rw-r--r--content/browser/renderer_host/render_widget_host_view_base.cc8
-rw-r--r--content/browser/renderer_host/render_widget_host_view_browsertest.cc4
-rw-r--r--content/browser/renderer_host/render_widget_host_view_win.cc18
-rw-r--r--content/browser/web_contents/web_contents_view_win.h4
-rw-r--r--content/browser/zygote_host/zygote_host_impl_linux.cc1
-rw-r--r--content/child/npapi/webplugin_delegate_impl_win.cc6
-rw-r--r--content/shell/app/shell_main_delegate.cc1
-rw-r--r--content/shell/browser/shell_win.cc16
-rw-r--r--remoting/host/plugin/host_plugin.cc2
-rw-r--r--tools/memory_watcher/hotkey.h4
-rw-r--r--ui/aura/root_window_host_win.h4
-rw-r--r--ui/base/ime/input_method_win.cc4
-rw-r--r--ui/base/l10n/l10n_util_win.cc2
-rw-r--r--ui/base/l10n/l10n_util_win_unittest.cc2
-rw-r--r--ui/base/layout.cc2
-rw-r--r--ui/base/resource/resource_bundle_win.cc2
-rw-r--r--ui/base/ui_base_switches.cc3
-rw-r--r--ui/base/ui_base_switches.h1
-rw-r--r--ui/base/win/events_win.cc2
-rw-r--r--ui/base/win/foreground_helper.cc2
-rw-r--r--ui/base/win/foreground_helper.h4
-rw-r--r--ui/base/win/hidden_window.cc4
-rw-r--r--ui/base/win/hwnd_subclass.cc6
-rw-r--r--ui/base/win/hwnd_subclass_unittest.cc6
-rw-r--r--ui/base/win/mouse_wheel_util.cc6
-rw-r--r--ui/compositor/test/test_compositor_host_win.cc4
-rw-r--r--ui/gfx/canvas_paint_win.h2
-rw-r--r--ui/gfx/display.cc2
-rw-r--r--ui/gfx/font_smoothing_win.cc6
-rw-r--r--ui/gfx/platform_font_win.cc6
-rw-r--r--ui/gfx/render_text.cc6
-rw-r--r--ui/gfx/render_text_linux.cc10
-rw-r--r--ui/gfx/render_text_win.cc12
-rw-r--r--ui/gfx/screen_win.cc2
-rw-r--r--ui/gfx/switches.cc5
-rw-r--r--ui/gfx/switches.h3
-rw-r--r--ui/gfx/sys_color_change_listener.cc8
-rw-r--r--ui/gfx/utf16_indexing.cc (renamed from ui/base/text/utf16_indexing.cc)6
-rw-r--r--ui/gfx/utf16_indexing.h (renamed from ui/base/text/utf16_indexing.h)12
-rw-r--r--ui/gfx/utf16_indexing_unittest.cc (renamed from ui/base/text/utf16_indexing_unittest.cc)6
-rw-r--r--ui/gfx/win/dpi.cc (renamed from ui/gfx/dpi_win.cc)6
-rw-r--r--ui/gfx/win/dpi.h (renamed from ui/gfx/dpi_win.h)0
-rw-r--r--ui/gfx/win/hwnd_util.cc (renamed from ui/base/win/hwnd_util.cc)18
-rw-r--r--ui/gfx/win/hwnd_util.h (renamed from ui/base/win/hwnd_util.h)13
-rw-r--r--ui/gfx/win/scoped_set_map_mode.h (renamed from ui/base/win/scoped_set_map_mode.h)10
-rw-r--r--ui/gfx/win/singleton_hwnd.cc (renamed from ui/base/win/singleton_hwnd.cc)8
-rw-r--r--ui/gfx/win/singleton_hwnd.h (renamed from ui/base/win/singleton_hwnd.h)12
-rw-r--r--ui/gfx/win/window_impl.cc (renamed from ui/base/win/window_impl.cc)19
-rw-r--r--ui/gfx/win/window_impl.h (renamed from ui/base/win/window_impl.h)12
-rw-r--r--ui/native_theme/native_theme_win.cc2
-rw-r--r--ui/surface/accelerated_surface_win.cc4
-rw-r--r--ui/ui.gyp22
-rw-r--r--ui/ui_unittests.gypi2
-rw-r--r--ui/views/controls/combobox/native_combobox_win.cc4
-rw-r--r--ui/views/controls/menu/menu_win.cc4
-rw-r--r--ui/views/controls/menu/native_menu_win.cc8
-rw-r--r--ui/views/controls/native/native_view_host_win.cc4
-rw-r--r--ui/views/controls/native_control.cc6
-rw-r--r--ui/views/controls/native_control_win.cc6
-rw-r--r--ui/views/controls/textfield/native_textfield_win.cc4
-rw-r--r--ui/views/controls/textfield/textfield_views_model.cc4
-rw-r--r--ui/views/widget/aero_tooltip_manager.cc4
-rw-r--r--ui/views/widget/desktop_aura/desktop_root_window_host_win.cc2
-rw-r--r--ui/views/widget/native_widget_win.cc4
-rw-r--r--ui/views/widget/native_widget_win.h2
-rw-r--r--ui/views/widget/tooltip_manager_win.cc8
-rw-r--r--ui/views/win/hwnd_message_handler.cc10
-rw-r--r--ui/views/win/hwnd_message_handler.h4
-rw-r--r--webkit/child/webthemeengine_impl_win.cc2
91 files changed, 234 insertions, 239 deletions
diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
index 207744e..65a2a7e 100644
--- a/chrome/browser/about_flags.cc
+++ b/chrome/browser/about_flags.cc
@@ -1567,8 +1567,8 @@ const Experiment kExperiments[] = {
IDS_FLAGS_HIDPI_NAME,
IDS_FLAGS_HIDPI_DESCRIPTION,
kOsWin,
- ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(gfx::switches::kHighDPISupport, "1",
- gfx::switches::kHighDPISupport, "0")
+ ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(switches::kHighDPISupport, "1",
+ switches::kHighDPISupport, "0")
},
#if defined(OS_CHROMEOS)
{
diff --git a/chrome/browser/chrome_browser_main.cc b/chrome/browser/chrome_browser_main.cc
index fbbff83..4227996 100644
--- a/chrome/browser/chrome_browser_main.cc
+++ b/chrome/browser/chrome_browser_main.cc
@@ -175,7 +175,7 @@
#include "net/base/net_util.h"
#include "printing/printed_document.h"
#include "ui/base/l10n/l10n_util_win.h"
-#include "ui/gfx/dpi_win.h"
+#include "ui/gfx/win/dpi.h"
#endif // defined(OS_WIN)
#if defined(OS_MACOSX)
diff --git a/chrome/browser/chromeos/login/chrome_restart_request.cc b/chrome/browser/chromeos/login/chrome_restart_request.cc
index a06f5b9..9b2edd5 100644
--- a/chrome/browser/chromeos/login/chrome_restart_request.cc
+++ b/chrome/browser/chromeos/login/chrome_restart_request.cc
@@ -189,8 +189,8 @@ std::string DeriveCommandLine(const GURL& start_url,
chromeos::switches::kHasChromeOSKeyboard,
chromeos::switches::kLoginProfile,
chromeos::switches::kNaturalScrollDefault,
- gfx::switches::kEnableBrowserTextSubpixelPositioning,
- gfx::switches::kEnableWebkitTextSubpixelPositioning,
+ ::switches::kEnableBrowserTextSubpixelPositioning,
+ ::switches::kEnableWebkitTextSubpixelPositioning,
views::corewm::switches::kNoDropShadows,
views::corewm::switches::kWindowAnimationsDisabled,
};
diff --git a/chrome/browser/extensions/api/system_display/display_info_provider_win.cc b/chrome/browser/extensions/api/system_display/display_info_provider_win.cc
index 57a4c3a..dca172e 100644
--- a/chrome/browser/extensions/api/system_display/display_info_provider_win.cc
+++ b/chrome/browser/extensions/api/system_display/display_info_provider_win.cc
@@ -8,8 +8,8 @@
#include "base/strings/utf_string_conversions.h"
#include "ui/gfx/display.h"
-#include "ui/gfx/dpi_win.h"
#include "ui/gfx/size.h"
+#include "ui/gfx/win/dpi.h"
namespace extensions {
diff --git a/chrome/browser/hang_monitor/hung_plugin_action.cc b/chrome/browser/hang_monitor/hung_plugin_action.cc
index cdb9e59..bc93207 100644
--- a/chrome/browser/hang_monitor/hung_plugin_action.cc
+++ b/chrome/browser/hang_monitor/hung_plugin_action.cc
@@ -14,7 +14,7 @@
#include "content/public/common/webplugininfo.h"
#include "grit/generated_resources.h"
#include "ui/base/l10n/l10n_util.h"
-#include "ui/base/win/hwnd_util.h"
+#include "ui/gfx/win/hwnd_util.h"
namespace {
@@ -186,7 +186,7 @@ bool HungPluginAction::GetPluginNameAndVersion(HWND plugin_window,
// static
BOOL CALLBACK HungPluginAction::DismissMessageBox(HWND window, LPARAM ignore) {
- string16 class_name = ui::GetClassName(window);
+ string16 class_name = gfx::GetClassName(window);
// #32770 is the dialog window class which is the window class of
// the message box being displayed.
if (class_name == L"#32770") {
diff --git a/chrome/browser/metrics/metrics_log.cc b/chrome/browser/metrics/metrics_log.cc
index b55fab7..38df09f 100644
--- a/chrome/browser/metrics/metrics_log.cc
+++ b/chrome/browser/metrics/metrics_log.cc
@@ -58,7 +58,7 @@
#if defined(OS_WIN)
#include "base/win/metro.h"
-#include "ui/gfx/dpi_win.h"
+#include "ui/gfx/win/dpi.h"
// http://blogs.msdn.com/oldnewthing/archive/2004/10/25/247180.aspx
extern "C" IMAGE_DOS_HEADER __ImageBase;
diff --git a/chrome/browser/process_singleton_win.cc b/chrome/browser/process_singleton_win.cc
index e82bf79..66a8180 100644
--- a/chrome/browser/process_singleton_win.cc
+++ b/chrome/browser/process_singleton_win.cc
@@ -38,7 +38,7 @@
#include "grit/generated_resources.h"
#include "net/base/escape.h"
#include "ui/base/l10n/l10n_util.h"
-#include "ui/base/win/hwnd_util.h"
+#include "ui/gfx/win/hwnd_util.h"
namespace {
diff --git a/chrome/browser/ui/views/app_menu_button_win.cc b/chrome/browser/ui/views/app_menu_button_win.cc
index 4e0a3a0..3e63d81 100644
--- a/chrome/browser/ui/views/app_menu_button_win.cc
+++ b/chrome/browser/ui/views/app_menu_button_win.cc
@@ -5,7 +5,7 @@
#include "chrome/browser/ui/views/app_menu_button_win.h"
#include "ui/base/events/event.h"
-#include "ui/base/win/hwnd_util.h"
+#include "ui/gfx/win/hwnd_util.h"
#include "ui/views/widget/widget.h"
AppMenuButtonWin::AppMenuButtonWin(views::MenuButtonListener* listener)
@@ -15,7 +15,7 @@ AppMenuButtonWin::AppMenuButtonWin(views::MenuButtonListener* listener)
bool AppMenuButtonWin::OnKeyPressed(const ui::KeyEvent& event) {
if (event.key_code() == ui::VKEY_SPACE) {
// Explicitly show the system menu at a good location on [Alt]+[Space].
- ui::ShowSystemMenu(GetWidget()->GetNativeView());
+ gfx::ShowSystemMenu(GetWidget()->GetNativeView());
return false;
}
return views::MenuButton::OnKeyPressed(event);
diff --git a/chrome/browser/ui/views/frame/browser_desktop_root_window_host_win.cc b/chrome/browser/ui/views/frame/browser_desktop_root_window_host_win.cc
index 6310a02..916fe65 100644
--- a/chrome/browser/ui/views/frame/browser_desktop_root_window_host_win.cc
+++ b/chrome/browser/ui/views/frame/browser_desktop_root_window_host_win.cc
@@ -17,7 +17,7 @@
#include "chrome/browser/ui/views/theme_image_mapper.h"
#include "grit/theme_resources.h"
#include "ui/base/theme_provider.h"
-#include "ui/gfx/dpi_win.h"
+#include "ui/gfx/win/dpi.h"
#include "ui/views/controls/menu/native_menu_win.h"
#pragma comment(lib, "dwmapi.lib")
diff --git a/chrome/browser/ui/views/frame/browser_frame_win.cc b/chrome/browser/ui/views/frame/browser_frame_win.cc
index 872ae88..c9d9ad8 100644
--- a/chrome/browser/ui/views/frame/browser_frame_win.cc
+++ b/chrome/browser/ui/views/frame/browser_frame_win.cc
@@ -36,8 +36,8 @@
#include "ui/base/resource/resource_bundle.h"
#include "ui/base/theme_provider.h"
#include "ui/base/window_open_disposition.h"
-#include "ui/gfx/dpi_win.h"
#include "ui/gfx/font.h"
+#include "ui/gfx/win/dpi.h"
#include "ui/views/controls/menu/native_menu_win.h"
#include "ui/views/views_delegate.h"
#include "ui/views/widget/native_widget_win.h"
diff --git a/chrome/browser/ui/views/frame/glass_browser_frame_view.cc b/chrome/browser/ui/views/frame/glass_browser_frame_view.cc
index a6c83e7..bc69baa 100644
--- a/chrome/browser/ui/views/frame/glass_browser_frame_view.cc
+++ b/chrome/browser/ui/views/frame/glass_browser_frame_view.cc
@@ -26,9 +26,9 @@
#include "ui/base/resource/resource_bundle_win.h"
#include "ui/base/theme_provider.h"
#include "ui/gfx/canvas.h"
-#include "ui/gfx/dpi_win.h"
#include "ui/gfx/icon_util.h"
#include "ui/gfx/image/image.h"
+#include "ui/gfx/win/dpi.h"
#include "ui/views/controls/label.h"
#include "ui/views/layout/layout_constants.h"
#include "ui/views/win/hwnd_util.h"
diff --git a/chrome/browser/ui/views/frame/minimize_button_metrics_win.cc b/chrome/browser/ui/views/frame/minimize_button_metrics_win.cc
index 784c483..858b7a9 100644
--- a/chrome/browser/ui/views/frame/minimize_button_metrics_win.cc
+++ b/chrome/browser/ui/views/frame/minimize_button_metrics_win.cc
@@ -6,7 +6,7 @@
#include "base/logging.h"
#include "base/i18n/rtl.h"
-#include "ui/gfx/dpi_win.h"
+#include "ui/gfx/win/dpi.h"
namespace {
diff --git a/chrome/browser/ui/views/infobars/infobar_view.cc b/chrome/browser/ui/views/infobars/infobar_view.cc
index 0936c95..a791d1c 100644
--- a/chrome/browser/ui/views/infobars/infobar_view.cc
+++ b/chrome/browser/ui/views/infobars/infobar_view.cc
@@ -38,8 +38,8 @@
#if defined(OS_WIN)
#include "base/win/win_util.h"
#include "base/win/windows_version.h"
-#include "ui/base/win/hwnd_util.h"
#include "ui/gfx/icon_util.h"
+#include "ui/gfx/win/hwnd_util.h"
#endif
// static
@@ -340,7 +340,7 @@ void InfoBarView::PlatformSpecificHide(bool animate) {
// Do not restore focus (and active state with it) if some other top-level
// window became active.
views::Widget* widget = GetWidget();
- if (!widget || ui::DoesWindowBelongToActiveWindow(widget->GetNativeView()))
+ if (!widget || gfx::DoesWindowBelongToActiveWindow(widget->GetNativeView()))
FocusLastFocusedExternalView();
#endif
}
diff --git a/chrome/browser/ui/views/omnibox/omnibox_view_win.cc b/chrome/browser/ui/views/omnibox/omnibox_view_win.cc
index fde88da..651bf4c 100644
--- a/chrome/browser/ui/views/omnibox/omnibox_view_win.cc
+++ b/chrome/browser/ui/views/omnibox/omnibox_view_win.cc
@@ -62,11 +62,11 @@
#include "ui/base/l10n/l10n_util.h"
#include "ui/base/l10n/l10n_util_win.h"
#include "ui/base/touch/touch_enabled.h"
-#include "ui/base/win/hwnd_util.h"
#include "ui/base/win/mouse_wheel_util.h"
#include "ui/base/win/touch_input.h"
#include "ui/gfx/canvas.h"
#include "ui/gfx/image/image.h"
+#include "ui/gfx/win/hwnd_util.h"
#include "ui/views/button_drag_utils.h"
#include "ui/views/controls/menu/menu_item_view.h"
#include "ui/views/controls/menu/menu_runner.h"
@@ -2037,7 +2037,7 @@ void OmniboxViewWin::OnSysChar(TCHAR ch,
// something useful, so discard those. Note that [Ctrl]+[Alt]+<xxx> generates
// WM_CHAR instead of WM_SYSCHAR, so it is not handled here.
if (ch == VK_SPACE) {
- ui::ShowSystemMenu(
+ gfx::ShowSystemMenu(
native_view_host_->GetWidget()->GetTopLevelWidget()->GetNativeWindow());
}
}
diff --git a/chrome/browser/ui/views/simple_message_box_win.cc b/chrome/browser/ui/views/simple_message_box_win.cc
index a0eef7d..0b31734 100644
--- a/chrome/browser/ui/views/simple_message_box_win.cc
+++ b/chrome/browser/ui/views/simple_message_box_win.cc
@@ -5,8 +5,8 @@
#include "chrome/browser/ui/simple_message_box.h"
#include "components/startup_metric_utils/startup_metric_utils.h"
-#include "ui/base/win/hwnd_util.h"
#include "ui/base/win/message_box_win.h"
+#include "ui/gfx/win/hwnd_util.h"
namespace chrome {
@@ -37,7 +37,7 @@ MessageBoxResult ShowMessageBox(gfx::NativeWindow parent,
startup_metric_utils::SetNonBrowserUIDisplayed();
if (!parent)
- parent = ui::GetWindowToParentTo(true);
+ parent = gfx::GetWindowToParentTo(true);
return NativeShowMessageBox(parent, title, message, type);
}
diff --git a/chrome/browser/ui/views/status_icons/status_tray_win.cc b/chrome/browser/ui/views/status_icons/status_tray_win.cc
index a1f5c66..dbc7d5a 100644
--- a/chrome/browser/ui/views/status_icons/status_tray_win.cc
+++ b/chrome/browser/ui/views/status_icons/status_tray_win.cc
@@ -9,8 +9,8 @@
#include "base/win/wrapped_window_proc.h"
#include "chrome/browser/ui/views/status_icons/status_icon_win.h"
#include "chrome/common/chrome_constants.h"
-#include "ui/base/win/hwnd_util.h"
#include "ui/gfx/screen.h"
+#include "ui/gfx/win/hwnd_util.h"
#include "win8/util/win8_util.h"
static const UINT kStatusIconMessage = WM_APP + 1;
@@ -50,8 +50,8 @@ StatusTrayWin::StatusTrayWin()
// "TaskbarCreated".
window_ = CreateWindow(MAKEINTATOM(atom_),
0, WS_POPUP, 0, 0, 0, 0, 0, 0, instance_, 0);
- ui::CheckWindowCreated(window_);
- ui::SetWindowUserData(window_, this);
+ gfx::CheckWindowCreated(window_);
+ gfx::SetWindowUserData(window_, this);
}
LRESULT CALLBACK StatusTrayWin::WndProcStatic(HWND hwnd,
diff --git a/chrome/browser/ui/views/tabs/dragged_tab_view.cc b/chrome/browser/ui/views/tabs/dragged_tab_view.cc
index e203fcb..bb3b8a6 100644
--- a/chrome/browser/ui/views/tabs/dragged_tab_view.cc
+++ b/chrome/browser/ui/views/tabs/dragged_tab_view.cc
@@ -13,7 +13,7 @@
#if defined(USE_AURA)
#include "ui/views/widget/native_widget_aura.h"
#elif defined(OS_WIN)
-#include "ui/gfx/dpi_win.h"
+#include "ui/gfx/win/dpi.h"
#include "ui/views/widget/native_widget_win.h"
#endif
diff --git a/chrome/browser/ui/views/tabs/tab_strip.cc b/chrome/browser/ui/views/tabs/tab_strip.cc
index 321fe2c..21638bd 100644
--- a/chrome/browser/ui/views/tabs/tab_strip.cc
+++ b/chrome/browser/ui/views/tabs/tab_strip.cc
@@ -52,7 +52,7 @@
#include "ui/views/window/non_client_view.h"
#if defined(OS_WIN)
-#include "ui/base/win/hwnd_util.h"
+#include "ui/gfx/win/hwnd_util.h"
#include "ui/views/widget/monitor_win.h"
#include "win8/util/win8_util.h"
#endif
@@ -380,7 +380,7 @@ void NewTabButton::OnMouseReleased(const ui::MouseEvent& event) {
views::View::ConvertPointToScreen(this, &point);
bool destroyed = false;
destroyed_ = &destroyed;
- ui::ShowSystemMenuAtPoint(GetWidget()->GetNativeView(), point);
+ gfx::ShowSystemMenuAtPoint(GetWidget()->GetNativeView(), point);
if (destroyed)
return;
diff --git a/content/app/content_main_runner.cc b/content/app/content_main_runner.cc
index 7bfc37b..949514a 100644
--- a/content/app/content_main_runner.cc
+++ b/content/app/content_main_runner.cc
@@ -49,7 +49,7 @@
#include "sandbox/win/src/sandbox_types.h"
#include "ui/base/ui_base_paths.h"
#include "ui/base/ui_base_switches.h"
-#include "ui/gfx/dpi_win.h"
+#include "ui/gfx/win/dpi.h"
#include "webkit/common/user_agent/user_agent.h"
#if defined(USE_TCMALLOC)
diff --git a/content/browser/plugin_service_impl.cc b/content/browser/plugin_service_impl.cc
index 3837223..5a79f7d 100644
--- a/content/browser/plugin_service_impl.cc
+++ b/content/browser/plugin_service_impl.cc
@@ -33,7 +33,7 @@
#if defined(OS_WIN)
#include "content/common/plugin_constants_win.h"
-#include "ui/base/win/hwnd_util.h"
+#include "ui/gfx/win/hwnd_util.h"
#endif
#if defined(OS_POSIX)
@@ -837,7 +837,7 @@ bool PluginServiceImpl::GetPluginInfoFromWindow(
}
bool PluginServiceImpl::IsPluginWindow(HWND window) {
- return ui::GetClassName(window) == base::string16(kNativeWindowClassName);
+ return gfx::GetClassName(window) == base::string16(kNativeWindowClassName);
}
#endif
diff --git a/content/browser/renderer_host/backing_store_win.cc b/content/browser/renderer_host/backing_store_win.cc
index 9992fde..8e761dd 100644
--- a/content/browser/renderer_host/backing_store_win.cc
+++ b/content/browser/renderer_host/backing_store_win.cc
@@ -9,10 +9,10 @@
#include "content/browser/renderer_host/render_widget_host_impl.h"
#include "content/public/common/content_switches.h"
#include "skia/ext/platform_canvas.h"
-#include "ui/gfx/dpi_win.h"
#include "ui/gfx/gdi_util.h"
#include "ui/gfx/rect_conversions.h"
#include "ui/gfx/size_conversions.h"
+#include "ui/gfx/win/dpi.h"
#include "ui/surface/transport_dib.h"
namespace content {
diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc
index 4981d60..1c958c7 100644
--- a/content/browser/renderer_host/render_process_host_impl.cc
+++ b/content/browser/renderer_host/render_process_host_impl.cc
@@ -129,6 +129,7 @@
#include "net/url_request/url_request_context_getter.h"
#include "ppapi/shared_impl/ppapi_switches.h"
#include "ui/base/ui_base_switches.h"
+#include "ui/gfx/switches.h"
#include "ui/gl/gl_switches.h"
#include "webkit/browser/fileapi/sandbox_file_system_backend.h"
#include "webkit/common/resource_type.h"
diff --git a/content/browser/renderer_host/render_widget_host_view_base.cc b/content/browser/renderer_host/render_widget_host_view_base.cc
index 11248c3..5718103 100644
--- a/content/browser/renderer_host/render_widget_host_view_base.cc
+++ b/content/browser/renderer_host/render_widget_host_view_base.cc
@@ -29,9 +29,9 @@
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/child_process_data.h"
#include "content/public/common/content_switches.h"
-#include "ui/base/win/hwnd_util.h"
-#include "ui/gfx/dpi_win.h"
#include "ui/gfx/gdi_util.h"
+#include "ui/gfx/win/dpi.h"
+#include "ui/gfx/win/hwnd_util.h"
#endif
#if defined(TOOLKIT_GTK)
@@ -118,7 +118,7 @@ LRESULT CALLBACK PluginWrapperWindowProc(HWND window, unsigned int message,
}
bool IsPluginWrapperWindow(HWND window) {
- return ui::GetClassNameW(window) ==
+ return gfx::GetClassNameW(window) ==
string16(kWrapperNativeWindowClassName);
}
@@ -151,7 +151,7 @@ HWND ReparentWindow(HWND window, HWND parent) {
MAKEINTATOM(atom), 0,
WS_CHILD | WS_CLIPCHILDREN | WS_CLIPSIBLINGS,
0, 0, 0, 0, parent, 0, instance, 0);
- ui::CheckWindowCreated(new_parent);
+ gfx::CheckWindowCreated(new_parent);
::SetParent(window, new_parent);
// How many times we try to find a PluginProcessHost whose process matches
// the HWND.
diff --git a/content/browser/renderer_host/render_widget_host_view_browsertest.cc b/content/browser/renderer_host/render_widget_host_view_browsertest.cc
index 4b7c75e..9adc504 100644
--- a/content/browser/renderer_host/render_widget_host_view_browsertest.cc
+++ b/content/browser/renderer_host/render_widget_host_view_browsertest.cc
@@ -37,7 +37,7 @@
#endif
#if defined(OS_WIN)
-#include "ui/gfx/dpi_win.h"
+#include "ui/gfx/win/dpi.h"
#endif
namespace content {
@@ -835,7 +835,7 @@ class CompositingRenderWidgetHostViewTabCaptureHighDPI
cmd->AppendSwitchASCII(switches::kForceDeviceScaleFactor,
base::StringPrintf("%f", scale()));
#if defined(OS_WIN)
- cmd->AppendSwitchASCII(gfx::switches::kHighDPISupport, "1");
+ cmd->AppendSwitchASCII(switches::kHighDPISupport, "1");
gfx::EnableHighDPISupport();
#endif
}
diff --git a/content/browser/renderer_host/render_widget_host_view_win.cc b/content/browser/renderer_host/render_widget_host_view_win.cc
index c8c4dc4..a798404 100644
--- a/content/browser/renderer_host/render_widget_host_view_win.cc
+++ b/content/browser/renderer_host/render_widget_host_view_win.cc
@@ -67,15 +67,15 @@
#include "ui/base/touch/touch_enabled.h"
#include "ui/base/ui_base_switches.h"
#include "ui/base/view_prop.h"
-#include "ui/base/win/hwnd_util.h"
#include "ui/base/win/mouse_wheel_util.h"
#include "ui/base/win/touch_input.h"
#include "ui/gfx/canvas.h"
-#include "ui/gfx/dpi_win.h"
#include "ui/gfx/rect.h"
#include "ui/gfx/rect_conversions.h"
#include "ui/gfx/screen.h"
#include "ui/gfx/text_elider.h"
+#include "ui/gfx/win/dpi.h"
+#include "ui/gfx/win/hwnd_util.h"
#include "webkit/common/cursors/webcursor.h"
#include "win8/util/win8_util.h"
@@ -451,7 +451,7 @@ void RenderWidgetHostViewWin::InitAsFullscreen(
gfx::Rect pos = gfx::Screen::GetNativeScreen()->GetDisplayNearestWindow(
reference_host_view->GetNativeView()).bounds();
is_fullscreen_ = true;
- DoPopupOrFullscreenInit(ui::GetWindowToParentTo(true), pos, 0);
+ DoPopupOrFullscreenInit(gfx::GetWindowToParentTo(true), pos, 0);
}
RenderWidgetHost* RenderWidgetHostViewWin::GetRenderWidgetHost() const {
@@ -575,7 +575,7 @@ void RenderWidgetHostViewWin::CleanupCompositorWindow() {
if (!compositor_host_window_)
return;
- ui::SetWindowUserData(compositor_host_window_, NULL);
+ gfx::SetWindowUserData(compositor_host_window_, NULL);
// Hide the compositor and parent it to the desktop rather than destroying
// it immediately. The GPU process has a grace period to stop accessing the
@@ -626,7 +626,7 @@ void RenderWidgetHostViewWin::Show() {
}
void RenderWidgetHostViewWin::Hide() {
- if (!is_fullscreen_ && GetParent() == ui::GetWindowToParentTo(true)) {
+ if (!is_fullscreen_ && GetParent() == gfx::GetWindowToParentTo(true)) {
LOG(WARNING) << "Hide() called twice in a row: " << this << ":"
<< GetParent();
return;
@@ -2318,7 +2318,7 @@ LRESULT RenderWidgetHostViewWin::OnMouseActivate(UINT message,
::ScreenToClient(m_hWnd, &cursor_pos);
HWND child_window = ::RealChildWindowFromPoint(m_hWnd, cursor_pos);
if (::IsWindow(child_window) && child_window != m_hWnd) {
- if (ui::GetClassName(child_window) == kWrapperNativeWindowClassName)
+ if (gfx::GetClassName(child_window) == kWrapperNativeWindowClassName)
child_window = ::GetWindow(child_window, GW_CHILD);
::SetFocus(child_window);
@@ -2464,7 +2464,7 @@ static void PaintCompositorHostWindow(HWND hWnd) {
BeginPaint(hWnd, &paint);
RenderWidgetHostViewWin* win = static_cast<RenderWidgetHostViewWin*>(
- ui::GetWindowUserData(hWnd));
+ gfx::GetWindowUserData(hWnd));
// Trigger composite to rerender window.
if (win)
win->AcceleratedPaint(paint.hdc);
@@ -2563,9 +2563,9 @@ gfx::GLSurfaceHandle RenderWidgetHostViewWin::GetCompositingSurface() {
MAKEINTATOM(atom), 0,
WS_CHILD | WS_CLIPCHILDREN | WS_CLIPSIBLINGS | WS_DISABLED,
0, 0, width, height, m_hWnd, 0, instance, 0);
- ui::CheckWindowCreated(compositor_host_window_);
+ gfx::CheckWindowCreated(compositor_host_window_);
- ui::SetWindowUserData(compositor_host_window_, this);
+ gfx::SetWindowUserData(compositor_host_window_, this);
gfx::GLSurfaceHandle surface_handle(compositor_host_window_,
gfx::NATIVE_TRANSPORT);
diff --git a/content/browser/web_contents/web_contents_view_win.h b/content/browser/web_contents/web_contents_view_win.h
index 3ca6b48..adfe675 100644
--- a/content/browser/web_contents/web_contents_view_win.h
+++ b/content/browser/web_contents/web_contents_view_win.h
@@ -13,7 +13,7 @@
#include "content/common/drag_event_source_info.h"
#include "content/port/browser/render_view_host_delegate_view.h"
#include "content/port/browser/web_contents_view_port.h"
-#include "ui/base/win/window_impl.h"
+#include "ui/gfx/win/window_impl.h"
namespace ui {
class HWNDMessageFilter;
@@ -29,7 +29,7 @@ class WebDragDest;
class CONTENT_EXPORT WebContentsViewWin
: public WebContentsViewPort,
public RenderViewHostDelegateView,
- public ui::WindowImpl {
+ public gfx::WindowImpl {
public:
WebContentsViewWin(WebContentsImpl* web_contents,
WebContentsViewDelegate* delegate);
diff --git a/content/browser/zygote_host/zygote_host_impl_linux.cc b/content/browser/zygote_host/zygote_host_impl_linux.cc
index 3629a84..fea43b5 100644
--- a/content/browser/zygote_host/zygote_host_impl_linux.cc
+++ b/content/browser/zygote_host/zygote_host_impl_linux.cc
@@ -37,6 +37,7 @@
#include "sandbox/linux/suid/client/setuid_sandbox_client.h"
#include "sandbox/linux/suid/common/sandbox.h"
#include "ui/base/ui_base_switches.h"
+#include "ui/gfx/switches.h"
#if defined(USE_TCMALLOC)
#include "third_party/tcmalloc/chromium/src/gperftools/heap-profiler.h"
diff --git a/content/child/npapi/webplugin_delegate_impl_win.cc b/content/child/npapi/webplugin_delegate_impl_win.cc
index e788cb2..f6d0540 100644
--- a/content/child/npapi/webplugin_delegate_impl_win.cc
+++ b/content/child/npapi/webplugin_delegate_impl_win.cc
@@ -31,8 +31,8 @@
#include "content/public/common/content_constants.h"
#include "skia/ext/platform_canvas.h"
#include "third_party/WebKit/public/web/WebInputEvent.h"
-#include "ui/base/win/hwnd_util.h"
-#include "ui/gfx/dpi_win.h"
+#include "ui/gfx/win/dpi.h"
+#include "ui/gfx/win/hwnd_util.h"
#include "webkit/common/cursors/webcursor.h"
using WebKit::WebKeyboardEvent;
@@ -1462,7 +1462,7 @@ FARPROC WINAPI WebPluginDelegateImpl::GetProcAddressPatch(HMODULE module,
void WebPluginDelegateImpl::HandleCaptureForMessage(HWND window,
UINT message) {
- if (ui::GetClassName(window) != base::string16(kNativeWindowClassName))
+ if (gfx::GetClassName(window) != base::string16(kNativeWindowClassName))
return;
switch (message) {
diff --git a/content/shell/app/shell_main_delegate.cc b/content/shell/app/shell_main_delegate.cc
index c089007..b5fbb8ec 100644
--- a/content/shell/app/shell_main_delegate.cc
+++ b/content/shell/app/shell_main_delegate.cc
@@ -22,6 +22,7 @@
#include "ui/base/resource/resource_bundle.h"
#include "ui/base/ui_base_paths.h"
#include "ui/base/ui_base_switches.h"
+#include "ui/gfx/switches.h"
#include "ui/gl/gl_switches.h"
#include "ipc/ipc_message.h" // For IPC_MESSAGE_LOG_ENABLED.
diff --git a/content/shell/browser/shell_win.cc b/content/shell/browser/shell_win.cc
index d1bb402..2854e5c 100644
--- a/content/shell/browser/shell_win.cc
+++ b/content/shell/browser/shell_win.cc
@@ -14,7 +14,7 @@
#include "content/public/browser/web_contents.h"
#include "content/public/browser/web_contents_view.h"
#include "content/shell/app/resource.h"
-#include "ui/base/win/hwnd_util.h"
+#include "ui/gfx/win/hwnd_util.h"
namespace {
@@ -52,8 +52,8 @@ void Shell::PlatformExit() {
void Shell::PlatformCleanUp() {
// When the window is destroyed, tell the Edit field to forget about us,
// otherwise we will crash.
- ui::SetWindowProc(url_edit_view_, default_edit_wnd_proc_);
- ui::SetWindowUserData(url_edit_view_, NULL);
+ gfx::SetWindowProc(url_edit_view_, default_edit_wnd_proc_);
+ gfx::SetWindowUserData(url_edit_view_, NULL);
}
void Shell::PlatformEnableUIControl(UIControl control, bool is_enabled) {
@@ -89,7 +89,7 @@ void Shell::PlatformCreateWindow(int width, int height) {
WS_OVERLAPPEDWINDOW | WS_CLIPCHILDREN,
CW_USEDEFAULT, 0, CW_USEDEFAULT, 0,
NULL, NULL, instance_handle_, NULL);
- ui::SetWindowUserData(window_, this);
+ gfx::SetWindowUserData(window_, this);
HWND hwnd;
int x = 0;
@@ -124,9 +124,9 @@ void Shell::PlatformCreateWindow(int width, int height) {
ES_AUTOVSCROLL | ES_AUTOHSCROLL,
x, 0, 0, 0, window_, 0, instance_handle_, 0);
- default_edit_wnd_proc_ = ui::SetWindowProc(url_edit_view_,
+ default_edit_wnd_proc_ = gfx::SetWindowProc(url_edit_view_,
Shell::EditWndProc);
- ui::SetWindowUserData(url_edit_view_, this);
+ gfx::SetWindowUserData(url_edit_view_, this);
ShowWindow(window_, SW_SHOW);
@@ -192,7 +192,7 @@ ATOM Shell::RegisterWindowClass() {
LRESULT CALLBACK Shell::WndProc(HWND hwnd, UINT message, WPARAM wParam,
LPARAM lParam) {
- Shell* shell = static_cast<Shell*>(ui::GetWindowUserData(hwnd));
+ Shell* shell = static_cast<Shell*>(gfx::GetWindowUserData(hwnd));
switch (message) {
case WM_COMMAND: {
@@ -254,7 +254,7 @@ LRESULT CALLBACK Shell::WndProc(HWND hwnd, UINT message, WPARAM wParam,
LRESULT CALLBACK Shell::EditWndProc(HWND hwnd, UINT message,
WPARAM wParam, LPARAM lParam) {
- Shell* shell = static_cast<Shell*>(ui::GetWindowUserData(hwnd));
+ Shell* shell = static_cast<Shell*>(gfx::GetWindowUserData(hwnd));
switch (message) {
case WM_CHAR:
diff --git a/remoting/host/plugin/host_plugin.cc b/remoting/host/plugin/host_plugin.cc
index b8e2b13..f281bd1 100644
--- a/remoting/host/plugin/host_plugin.cc
+++ b/remoting/host/plugin/host_plugin.cc
@@ -21,7 +21,7 @@
#include "remoting/host/plugin/host_plugin_utils.h"
#include "remoting/host/plugin/host_script_object.h"
#if defined(OS_WIN)
-#include "ui/gfx/dpi_win.h"
+#include "ui/gfx/win/dpi.h"
#endif
#include "third_party/npapi/bindings/npapi.h"
#include "third_party/npapi/bindings/npfunctions.h"
diff --git a/tools/memory_watcher/hotkey.h b/tools/memory_watcher/hotkey.h
index 0348062..3773e5d 100644
--- a/tools/memory_watcher/hotkey.h
+++ b/tools/memory_watcher/hotkey.h
@@ -5,12 +5,12 @@
#ifndef TOOLS_MEMORY_WATCHER_HOTKEY_H_
#define TOOLS_MEMORY_WATCHER_HOTKEY_H_
-#include "ui/base/win/window_impl.h"
#include "ui/gfx/rect.h"
+#include "ui/gfx/win/window_impl.h"
// HotKey handler.
// Programs wishing to register a hotkey can use this.
-class HotKeyHandler : public ui::WindowImpl {
+class HotKeyHandler : public gfx::WindowImpl {
public:
HotKeyHandler(UINT modifiers, UINT vk)
: modifiers_(modifiers),
diff --git a/ui/aura/root_window_host_win.h b/ui/aura/root_window_host_win.h
index e2a60dd..42c8ada 100644
--- a/ui/aura/root_window_host_win.h
+++ b/ui/aura/root_window_host_win.h
@@ -8,11 +8,11 @@
#include "base/compiler_specific.h"
#include "ui/aura/root_window_host.h"
#include "ui/base/ui_export.h"
-#include "ui/base/win/window_impl.h"
+#include "ui/gfx/win/window_impl.h"
namespace aura {
-class RootWindowHostWin : public RootWindowHost, public ui::WindowImpl {
+class RootWindowHostWin : public RootWindowHost, public gfx::WindowImpl {
public:
RootWindowHostWin(const gfx::Rect& bounds);
virtual ~RootWindowHostWin();
diff --git a/ui/base/ime/input_method_win.cc b/ui/base/ime/input_method_win.cc
index 90f87da..3982c22 100644
--- a/ui/base/ime/input_method_win.cc
+++ b/ui/base/ime/input_method_win.cc
@@ -10,7 +10,7 @@
#include "ui/base/events/event_utils.h"
#include "ui/base/ime/text_input_client.h"
#include "ui/base/keycodes/keyboard_codes.h"
-#include "ui/base/win/hwnd_util.h"
+#include "ui/gfx/win/hwnd_util.h"
namespace ui {
namespace {
@@ -158,7 +158,7 @@ LRESULT InputMethodWin::OnChar(HWND window_handle,
// Note: Setting |handled| to FALSE for DefWindowProc triggering of the system
// menu causes undesirable titlebar artifacts in the classic theme.
if (message == WM_SYSCHAR && wparam == VK_SPACE)
- ui::ShowSystemMenu(window_handle);
+ gfx::ShowSystemMenu(window_handle);
return 0;
}
diff --git a/ui/base/l10n/l10n_util_win.cc b/ui/base/l10n/l10n_util_win.cc
index c49452c..0fa34cf 100644
--- a/ui/base/l10n/l10n_util_win.cc
+++ b/ui/base/l10n/l10n_util_win.cc
@@ -15,7 +15,7 @@
#include "base/win/windows_version.h"
#include "grit/app_locale_settings.h"
#include "ui/base/l10n/l10n_util.h"
-#include "ui/gfx/dpi_win.h"
+#include "ui/gfx/win/dpi.h"
namespace {
diff --git a/ui/base/l10n/l10n_util_win_unittest.cc b/ui/base/l10n/l10n_util_win_unittest.cc
index 3ef1100..c4ae888 100644
--- a/ui/base/l10n/l10n_util_win_unittest.cc
+++ b/ui/base/l10n/l10n_util_win_unittest.cc
@@ -9,7 +9,7 @@
#include "base/win/win_util.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "testing/platform_test.h"
-#include "ui/gfx/dpi_win.h"
+#include "ui/gfx/win/dpi.h"
typedef PlatformTest L10nUtilWinTest;
diff --git a/ui/base/layout.cc b/ui/base/layout.cc
index c035ae9..40a0a9c 100644
--- a/ui/base/layout.cc
+++ b/ui/base/layout.cc
@@ -23,7 +23,7 @@
#if defined(OS_WIN)
#include "base/win/metro.h"
-#include "ui/gfx/dpi_win.h"
+#include "ui/gfx/win/dpi.h"
#include <Windows.h>
#endif // defined(OS_WIN)
diff --git a/ui/base/resource/resource_bundle_win.cc b/ui/base/resource/resource_bundle_win.cc
index ffd2cd0..0a2b185 100644
--- a/ui/base/resource/resource_bundle_win.cc
+++ b/ui/base/resource/resource_bundle_win.cc
@@ -10,7 +10,7 @@
#include "ui/base/layout.h"
#include "ui/base/resource/resource_bundle.h"
#include "ui/base/resource/resource_data_dll_win.h"
-#include "ui/gfx/dpi_win.h"
+#include "ui/gfx/win/dpi.h"
namespace ui {
diff --git a/ui/base/ui_base_switches.cc b/ui/base/ui_base_switches.cc
index 3adb215..ca4586b 100644
--- a/ui/base/ui_base_switches.cc
+++ b/ui/base/ui_base_switches.cc
@@ -33,9 +33,6 @@ const char kEnableTouchEditing[] = "enable-touch-editing";
// Enables the Views textfield on Windows.
const char kEnableViewsTextfield[] = "enable-views-textfield";
-// Overrides the device scale factor for the browser UI and the contents.
-const char kForceDeviceScaleFactor[] = "force-device-scale-factor";
-
// If a resource is requested at a scale factor at which it is not available
// or the resource is the incorrect size (based on the size of the 1x resource),
// generates the missing resource and applies a red mask to the generated
diff --git a/ui/base/ui_base_switches.h b/ui/base/ui_base_switches.h
index cbe9a77..7e4c9a7 100644
--- a/ui/base/ui_base_switches.h
+++ b/ui/base/ui_base_switches.h
@@ -21,7 +21,6 @@ UI_EXPORT extern const char kEnableScrollPrediction[];
UI_EXPORT extern const char kEnableTouchDragDrop[];
UI_EXPORT extern const char kEnableTouchEditing[];
UI_EXPORT extern const char kEnableViewsTextfield[];
-UI_EXPORT extern const char kForceDeviceScaleFactor[];
UI_EXPORT extern const char kHighlightMissingScaledResources[];
UI_EXPORT extern const char kLang[];
UI_EXPORT extern const char kLocalePak[];
diff --git a/ui/base/win/events_win.cc b/ui/base/win/events_win.cc
index 4381cb0..6cb6d81 100644
--- a/ui/base/win/events_win.cc
+++ b/ui/base/win/events_win.cc
@@ -11,8 +11,8 @@
#include "base/win/win_util.h"
#include "ui/base/events/event_utils.h"
#include "ui/base/keycodes/keyboard_code_conversion_win.h"
-#include "ui/gfx/dpi_win.h"
#include "ui/gfx/point.h"
+#include "ui/gfx/win/dpi.h"
namespace ui {
diff --git a/ui/base/win/foreground_helper.cc b/ui/base/win/foreground_helper.cc
index 0b03582..219b26f 100644
--- a/ui/base/win/foreground_helper.cc
+++ b/ui/base/win/foreground_helper.cc
@@ -5,7 +5,7 @@
#include "ui/base/win/foreground_helper.h"
#include "base/logging.h"
-#include "ui/base/win/window_impl.h"
+#include "ui/gfx/win/window_impl.h"
namespace ui {
diff --git a/ui/base/win/foreground_helper.h b/ui/base/win/foreground_helper.h
index 7fc1834..e8101a0 100644
--- a/ui/base/win/foreground_helper.h
+++ b/ui/base/win/foreground_helper.h
@@ -6,7 +6,7 @@
#define UI_BASE_WIN_FOREGROUND_HELPER_H_
#include "base/logging.h"
-#include "ui/base/win/window_impl.h"
+#include "ui/gfx/win/window_impl.h"
namespace ui {
@@ -17,7 +17,7 @@ namespace ui {
// to be capable of moving to the foreground.
//
// This is probably leveraging a windows bug.
-class UI_EXPORT ForegroundHelper : public WindowImpl {
+class UI_EXPORT ForegroundHelper : public gfx::WindowImpl {
public:
ForegroundHelper() : window_(NULL) { }
diff --git a/ui/base/win/hidden_window.cc b/ui/base/win/hidden_window.cc
index fb4f483..3b21519 100644
--- a/ui/base/win/hidden_window.cc
+++ b/ui/base/win/hidden_window.cc
@@ -4,7 +4,7 @@
#include "ui/base/win/hidden_window.h"
-#include "ui/base/win/window_impl.h"
+#include "ui/gfx/win/window_impl.h"
namespace ui {
@@ -21,7 +21,7 @@ namespace {
// window that interact poorly with us.
//
// See: http://crbug.com/16476
-class TempParent : public ui::WindowImpl {
+class TempParent : public gfx::WindowImpl {
public:
static TempParent* Get() {
static TempParent* g_temp_parent;
diff --git a/ui/base/win/hwnd_subclass.cc b/ui/base/win/hwnd_subclass.cc
index cd557fa..34e2bf4 100644
--- a/ui/base/win/hwnd_subclass.cc
+++ b/ui/base/win/hwnd_subclass.cc
@@ -9,8 +9,8 @@
#include "base/logging.h"
#include "base/memory/scoped_vector.h"
#include "base/memory/singleton.h"
-#include "ui/base/win/hwnd_util.h"
-#include "ui/gfx/dpi_win.h"
+#include "ui/gfx/win/dpi.h"
+#include "ui/gfx/win/hwnd_util.h"
namespace {
const char kHWNDSubclassKey[] = "__UI_BASE_WIN_HWND_SUBCLASS_PROC__";
@@ -123,7 +123,7 @@ HWNDSubclass::HWNDSubclass(HWND target)
: target_(target),
original_wnd_proc_(GetCurrentWndProc(target)),
prop_(target, kHWNDSubclassKey, this) {
- ui::SetWindowProc(target_, &WndProc);
+ gfx::SetWindowProc(target_, &WndProc);
}
HWNDSubclass::~HWNDSubclass() {
diff --git a/ui/base/win/hwnd_subclass_unittest.cc b/ui/base/win/hwnd_subclass_unittest.cc
index 5917ef2..520f52b 100644
--- a/ui/base/win/hwnd_subclass_unittest.cc
+++ b/ui/base/win/hwnd_subclass_unittest.cc
@@ -6,13 +6,13 @@
#include "base/basictypes.h"
#include "testing/gtest/include/gtest/gtest.h"
-#include "ui/base/win/window_impl.h"
+#include "ui/gfx/win/window_impl.h"
namespace ui {
namespace {
-class TestWindow : public ui::WindowImpl {
+class TestWindow : public gfx::WindowImpl {
public:
TestWindow() : saw_message(false) {}
virtual ~TestWindow() {}
@@ -20,7 +20,7 @@ class TestWindow : public ui::WindowImpl {
bool saw_message;
private:
- // Overridden from ui::WindowImpl:
+ // Overridden from gfx::WindowImpl:
virtual BOOL ProcessWindowMessage(HWND window,
UINT message,
WPARAM w_param,
diff --git a/ui/base/win/mouse_wheel_util.cc b/ui/base/win/mouse_wheel_util.cc
index 941c069..223e3a8 100644
--- a/ui/base/win/mouse_wheel_util.cc
+++ b/ui/base/win/mouse_wheel_util.cc
@@ -8,7 +8,7 @@
#include "base/auto_reset.h"
#include "ui/base/view_prop.h"
-#include "ui/base/win/hwnd_util.h"
+#include "ui/gfx/win/hwnd_util.h"
namespace ui {
@@ -31,7 +31,7 @@ static bool WindowSupportsRerouteMouseWheel(HWND window) {
}
static bool IsCompatibleWithMouseWheelRedirection(HWND window) {
- std::wstring class_name = GetClassName(window);
+ std::wstring class_name = gfx::GetClassName(window);
// Mousewheel redirection to comboboxes is a surprising and
// undesireable user behavior.
return !(class_name == L"ComboBox" ||
@@ -39,7 +39,7 @@ static bool IsCompatibleWithMouseWheelRedirection(HWND window) {
}
static bool CanRedirectMouseWheelFrom(HWND window) {
- std::wstring class_name = GetClassName(window);
+ std::wstring class_name = gfx::GetClassName(window);
// Older Thinkpad mouse wheel drivers create a window under mouse wheel
// pointer. Detect if we are dealing with this window. In this case we
diff --git a/ui/compositor/test/test_compositor_host_win.cc b/ui/compositor/test/test_compositor_host_win.cc
index 452acee..60b7b0c 100644
--- a/ui/compositor/test/test_compositor_host_win.cc
+++ b/ui/compositor/test/test_compositor_host_win.cc
@@ -6,13 +6,13 @@
#include "base/compiler_specific.h"
#include "base/memory/scoped_ptr.h"
-#include "ui/base/win/window_impl.h"
#include "ui/compositor/compositor.h"
+#include "ui/gfx/win/window_impl.h"
namespace ui {
class TestCompositorHostWin : public TestCompositorHost,
- public WindowImpl,
+ public gfx::WindowImpl,
public CompositorDelegate {
public:
TestCompositorHostWin(const gfx::Rect& bounds) {
diff --git a/ui/gfx/canvas_paint_win.h b/ui/gfx/canvas_paint_win.h
index ed31a6e..c5d3aee 100644
--- a/ui/gfx/canvas_paint_win.h
+++ b/ui/gfx/canvas_paint_win.h
@@ -7,8 +7,8 @@
#include "skia/ext/platform_canvas.h"
#include "ui/gfx/canvas.h"
-#include "ui/gfx/dpi_win.h"
#include "ui/gfx/size.h"
+#include "ui/gfx/win/dpi.h"
namespace gfx {
diff --git a/ui/gfx/display.cc b/ui/gfx/display.cc
index 02d97a9..d3f0745 100644
--- a/ui/gfx/display.cc
+++ b/ui/gfx/display.cc
@@ -8,11 +8,11 @@
#include "base/logging.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/stringprintf.h"
-#include "ui/base/ui_base_switches.h"
#include "ui/gfx/insets.h"
#include "ui/gfx/point_conversions.h"
#include "ui/gfx/point_f.h"
#include "ui/gfx/size_conversions.h"
+#include "ui/gfx/switches.h"
namespace gfx {
namespace {
diff --git a/ui/gfx/font_smoothing_win.cc b/ui/gfx/font_smoothing_win.cc
index a4be729..b181fb5 100644
--- a/ui/gfx/font_smoothing_win.cc
+++ b/ui/gfx/font_smoothing_win.cc
@@ -5,13 +5,13 @@
#include "ui/gfx/font_smoothing_win.h"
#include "base/memory/singleton.h"
-#include "ui/base/win/singleton_hwnd.h"
+#include "ui/gfx/win/singleton_hwnd.h"
namespace {
// Helper class to cache font smoothing settings and listen for notifications
// to re-query them from the system.
-class CachedFontSmoothingSettings : public ui::SingletonHwnd::Observer {
+class CachedFontSmoothingSettings : public gfx::SingletonHwnd::Observer {
public:
static CachedFontSmoothingSettings* GetInstance();
@@ -66,7 +66,7 @@ void CachedFontSmoothingSettings::GetFontSmoothingSettings(
need_to_query_settings_ = false;
}
if (!observer_added_) {
- ui::SingletonHwnd::GetInstance()->AddObserver(this);
+ gfx::SingletonHwnd::GetInstance()->AddObserver(this);
observer_added_ = true;
}
*smoothing_enabled = smoothing_enabled_;
diff --git a/ui/gfx/platform_font_win.cc b/ui/gfx/platform_font_win.cc
index 4a792f6..2d4c006 100644
--- a/ui/gfx/platform_font_win.cc
+++ b/ui/gfx/platform_font_win.cc
@@ -17,9 +17,9 @@
#include "base/win/scoped_hdc.h"
#include "base/win/scoped_select_object.h"
#include "base/win/win_util.h"
-#include "ui/base/win/scoped_set_map_mode.h"
#include "ui/gfx/canvas.h"
#include "ui/gfx/font.h"
+#include "ui/gfx/win/scoped_set_map_mode.h"
namespace {
@@ -229,7 +229,7 @@ PlatformFontWin::HFontRef* PlatformFontWin::CreateHFontRef(HFONT font) {
{
base::win::ScopedGetDC screen_dc(NULL);
base::win::ScopedSelectObject scoped_font(screen_dc, font);
- ui::ScopedSetMapMode mode(screen_dc, MM_TEXT);
+ gfx::ScopedSetMapMode mode(screen_dc, MM_TEXT);
GetTextMetrics(screen_dc, &font_metrics);
}
@@ -284,7 +284,7 @@ int PlatformFontWin::HFontRef::GetDluBaseX() {
base::win::ScopedGetDC screen_dc(NULL);
base::win::ScopedSelectObject font(screen_dc, hfont_);
- ui::ScopedSetMapMode mode(screen_dc, MM_TEXT);
+ gfx::ScopedSetMapMode mode(screen_dc, MM_TEXT);
// Yes, this is how Microsoft recommends calculating the dialog unit
// conversions. See: http://support.microsoft.com/kb/125681
diff --git a/ui/gfx/render_text.cc b/ui/gfx/render_text.cc
index 06640e0..c4335b4 100644
--- a/ui/gfx/render_text.cc
+++ b/ui/gfx/render_text.cc
@@ -13,12 +13,12 @@
#include "third_party/icu/source/common/unicode/utf16.h"
#include "third_party/skia/include/core/SkTypeface.h"
#include "third_party/skia/include/effects/SkGradientShader.h"
-#include "ui/base/text/utf16_indexing.h"
#include "ui/gfx/canvas.h"
#include "ui/gfx/insets.h"
#include "ui/gfx/skia_util.h"
#include "ui/gfx/text_constants.h"
#include "ui/gfx/text_elider.h"
+#include "ui/gfx/utf16_indexing.h"
namespace gfx {
@@ -952,7 +952,7 @@ void RenderText::UpdateLayoutText() {
if (obscured_) {
size_t obscured_text_length =
- static_cast<size_t>(ui::UTF16IndexToOffset(text_, 0, text_.length()));
+ static_cast<size_t>(gfx::UTF16IndexToOffset(text_, 0, text_.length()));
layout_text_.assign(obscured_text_length, kPasswordReplacementChar);
if (obscured_reveal_index_ >= 0 &&
@@ -966,7 +966,7 @@ void RenderText::UpdateLayoutText() {
// Gets the index in |layout_text_| to be replaced.
const size_t cp_start =
- static_cast<size_t>(ui::UTF16IndexToOffset(text_, 0, start));
+ static_cast<size_t>(gfx::UTF16IndexToOffset(text_, 0, start));
if (layout_text_.length() > cp_start)
layout_text_.replace(cp_start, 1, text_.substr(start, end - start));
}
diff --git a/ui/gfx/render_text_linux.cc b/ui/gfx/render_text_linux.cc
index c6cf4f2..9ad2a3d 100644
--- a/ui/gfx/render_text_linux.cc
+++ b/ui/gfx/render_text_linux.cc
@@ -12,11 +12,11 @@
#include "base/i18n/break_iterator.h"
#include "base/logging.h"
#include "third_party/skia/include/core/SkTypeface.h"
-#include "ui/base/text/utf16_indexing.h"
#include "ui/gfx/canvas.h"
#include "ui/gfx/font.h"
#include "ui/gfx/font_render_params_linux.h"
#include "ui/gfx/pango_util.h"
+#include "ui/gfx/utf16_indexing.h"
namespace gfx {
@@ -252,7 +252,7 @@ std::vector<Rect> RenderTextLinux::GetSubstringBounds(const gfx::Range& range) {
size_t RenderTextLinux::TextIndexToLayoutIndex(size_t index) const {
DCHECK(layout_);
- ptrdiff_t offset = ui::UTF16IndexToOffset(text(), 0, index);
+ ptrdiff_t offset = gfx::UTF16IndexToOffset(text(), 0, index);
// Clamp layout indices to the length of the text actually used for layout.
offset = std::min<size_t>(offset, g_utf8_strlen(layout_text_, -1));
const char* layout_pointer = g_utf8_offset_to_pointer(layout_text_, offset);
@@ -263,7 +263,7 @@ size_t RenderTextLinux::LayoutIndexToTextIndex(size_t index) const {
DCHECK(layout_);
const char* layout_pointer = layout_text_ + index;
const long offset = g_utf8_pointer_to_offset(layout_text_, layout_pointer);
- return ui::UTF16OffsetToIndex(text(), 0, offset);
+ return gfx::UTF16OffsetToIndex(text(), 0, offset);
}
bool RenderTextLinux::IsCursorablePosition(size_t position) {
@@ -271,11 +271,11 @@ bool RenderTextLinux::IsCursorablePosition(size_t position) {
return true;
if (position >= text().length())
return position == text().length();
- if (!ui::IsValidCodePointIndex(text(), position))
+ if (!gfx::IsValidCodePointIndex(text(), position))
return false;
EnsureLayout();
- ptrdiff_t offset = ui::UTF16IndexToOffset(text(), 0, position);
+ ptrdiff_t offset = gfx::UTF16IndexToOffset(text(), 0, position);
// Check that the index corresponds with a valid text code point, that it is
// marked as a legitimate cursor position by Pango, and that it is not
// truncated from layout text (its glyph is shown on screen).
diff --git a/ui/gfx/render_text_win.cc b/ui/gfx/render_text_win.cc
index 2415060..2eff381 100644
--- a/ui/gfx/render_text_win.cc
+++ b/ui/gfx/render_text_win.cc
@@ -14,11 +14,11 @@
#include "base/strings/utf_string_conversions.h"
#include "base/win/windows_version.h"
#include "third_party/icu/source/common/unicode/uchar.h"
-#include "ui/base/text/utf16_indexing.h"
#include "ui/gfx/canvas.h"
#include "ui/gfx/font_fallback_win.h"
#include "ui/gfx/font_smoothing_win.h"
#include "ui/gfx/platform_font_win.h"
+#include "ui/gfx/utf16_indexing.h"
namespace gfx {
@@ -413,7 +413,7 @@ std::vector<Rect> RenderTextWin::GetSubstringBounds(const gfx::Range& range) {
size_t RenderTextWin::TextIndexToLayoutIndex(size_t index) const {
DCHECK_LE(index, text().length());
- ptrdiff_t i = obscured() ? ui::UTF16IndexToOffset(text(), 0, index) : index;
+ ptrdiff_t i = obscured() ? gfx::UTF16IndexToOffset(text(), 0, index) : index;
CHECK_GE(i, 0);
// Clamp layout indices to the length of the text actually used for layout.
return std::min<size_t>(GetLayoutText().length(), i);
@@ -424,7 +424,7 @@ size_t RenderTextWin::LayoutIndexToTextIndex(size_t index) const {
return index;
DCHECK_LE(index, GetLayoutText().length());
- const size_t text_index = ui::UTF16OffsetToIndex(text(), 0, index);
+ const size_t text_index = gfx::UTF16OffsetToIndex(text(), 0, index);
DCHECK_LE(text_index, text().length());
return text_index;
}
@@ -439,7 +439,7 @@ bool RenderTextWin::IsCursorablePosition(size_t position) {
// and that its glyph has distinct bounds (not mid-multi-character-grapheme).
// An example of a multi-character-grapheme that is not a surrogate-pair is:
// \x0915\x093f - (ki) - one of many Devanagari biconsonantal conjuncts.
- return ui::IsValidCodePointIndex(text(), position) &&
+ return gfx::IsValidCodePointIndex(text(), position) &&
position < LayoutIndexToTextIndex(GetLayoutText().length()) &&
GetGlyphBounds(position) != GetGlyphBounds(position - 1);
}
@@ -599,7 +599,7 @@ void RenderTextWin::ItemizeLogicalText() {
// Clamp run lengths to avoid exceeding the maximum supported glyph count.
if ((run_break - run->range.start()) > max_run_length) {
run_break = run->range.start() + max_run_length;
- if (!ui::IsValidCodePointIndex(layout_text, run_break))
+ if (!gfx::IsValidCodePointIndex(layout_text, run_break))
--run_break;
}
@@ -619,7 +619,7 @@ void RenderTextWin::ItemizeLogicalText() {
}
}
- DCHECK(ui::IsValidCodePointIndex(layout_text, run_break));
+ DCHECK(gfx::IsValidCodePointIndex(layout_text, run_break));
style.UpdatePosition(LayoutIndexToTextIndex(run_break));
if (script_item_break == run_break)
diff --git a/ui/gfx/screen_win.cc b/ui/gfx/screen_win.cc
index 7ae5306..7903cc5 100644
--- a/ui/gfx/screen_win.cc
+++ b/ui/gfx/screen_win.cc
@@ -11,7 +11,7 @@
#include "base/strings/utf_string_conversions.h"
#include "base/win/win_util.h"
#include "ui/gfx/display.h"
-#include "ui/gfx/dpi_win.h"
+#include "ui/gfx/win/dpi.h"
namespace {
diff --git a/ui/gfx/switches.cc b/ui/gfx/switches.cc
index a278f46..2f2eb9a 100644
--- a/ui/gfx/switches.cc
+++ b/ui/gfx/switches.cc
@@ -4,7 +4,6 @@
#include "ui/gfx/switches.h"
-namespace gfx {
namespace switches {
// Let text glyphs have X-positions that aren't snapped to the pixel grid in
@@ -17,8 +16,10 @@ const char kEnableBrowserTextSubpixelPositioning[] =
const char kEnableWebkitTextSubpixelPositioning[] =
"enable-webkit-text-subpixel-positioning";
+// Overrides the device scale factor for the browser UI and the contents.
+const char kForceDeviceScaleFactor[] = "force-device-scale-factor";
+
// Enables/Disables High DPI support (windows)
const char kHighDPISupport[] = "high-dpi-support";
} // namespace switches
-} // namespace gfx
diff --git a/ui/gfx/switches.h b/ui/gfx/switches.h
index f8069d0..e3cd9e7 100644
--- a/ui/gfx/switches.h
+++ b/ui/gfx/switches.h
@@ -7,14 +7,13 @@
#include "ui/gfx/gfx_export.h"
-namespace gfx {
namespace switches {
UI_EXPORT extern const char kEnableBrowserTextSubpixelPositioning[];
UI_EXPORT extern const char kEnableWebkitTextSubpixelPositioning[];
+UI_EXPORT extern const char kForceDeviceScaleFactor[];
UI_EXPORT extern const char kHighDPISupport[];
} // namespace switches
-} // namespace gfx
#endif // UI_GFX_SWITCHES_H_
diff --git a/ui/gfx/sys_color_change_listener.cc b/ui/gfx/sys_color_change_listener.cc
index 7a9fc84..d5646b3 100644
--- a/ui/gfx/sys_color_change_listener.cc
+++ b/ui/gfx/sys_color_change_listener.cc
@@ -13,7 +13,7 @@
#include "base/memory/singleton.h"
#include "base/observer_list.h"
#if defined(OS_WIN)
-#include "ui/base/win/singleton_hwnd.h"
+#include "ui/gfx/win/singleton_hwnd.h"
#endif
namespace gfx {
@@ -48,7 +48,7 @@ bool IsInvertedColorScheme() {
}
#if defined(OS_WIN)
-class SysColorChangeObserver : public ui::SingletonHwnd::Observer {
+class SysColorChangeObserver : public gfx::SingletonHwnd::Observer {
public:
static SysColorChangeObserver* GetInstance();
@@ -75,11 +75,11 @@ SysColorChangeObserver* SysColorChangeObserver::GetInstance() {
}
SysColorChangeObserver::SysColorChangeObserver() {
- ui::SingletonHwnd::GetInstance()->AddObserver(this);
+ gfx::SingletonHwnd::GetInstance()->AddObserver(this);
}
SysColorChangeObserver::~SysColorChangeObserver() {
- ui::SingletonHwnd::GetInstance()->RemoveObserver(this);
+ gfx::SingletonHwnd::GetInstance()->RemoveObserver(this);
}
void SysColorChangeObserver::AddListener(SysColorChangeListener* listener) {
diff --git a/ui/base/text/utf16_indexing.cc b/ui/gfx/utf16_indexing.cc
index d217f5d..6af10c1 100644
--- a/ui/base/text/utf16_indexing.cc
+++ b/ui/gfx/utf16_indexing.cc
@@ -2,12 +2,12 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "ui/base/text/utf16_indexing.h"
+#include "ui/gfx/utf16_indexing.h"
#include "base/logging.h"
#include "base/third_party/icu/icu_utf.h"
-namespace ui {
+namespace gfx {
bool IsValidCodePointIndex(const string16& s, size_t index) {
return index == 0 || index == s.length() ||
@@ -52,4 +52,4 @@ size_t UTF16OffsetToIndex(const string16& s, size_t base, ptrdiff_t offset) {
return pos;
}
-} // namespace ui
+} // namespace gfx
diff --git a/ui/base/text/utf16_indexing.h b/ui/gfx/utf16_indexing.h
index a1af3d9..7f56384 100644
--- a/ui/base/text/utf16_indexing.h
+++ b/ui/gfx/utf16_indexing.h
@@ -2,13 +2,13 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef UI_BASE_TEXT_UTF16_INDEXING_H_
-#define UI_BASE_TEXT_UTF16_INDEXING_H_
+#ifndef UI_GFX_UTF16_INDEXING_H_
+#define UI_GFX_UTF16_INDEXING_H_
#include "base/strings/string16.h"
-#include "ui/base/ui_export.h"
+#include "ui/gfx/gfx_export.h"
-namespace ui {
+namespace gfx {
// Returns false if s[index-1] is a high surrogate and s[index] is a low
// surrogate, true otherwise.
@@ -44,6 +44,6 @@ UI_EXPORT size_t UTF16OffsetToIndex(const string16& s,
size_t base,
ptrdiff_t offset);
-} // namespace ui
+} // namespace gfx
-#endif // UI_BASE_TEXT_UTF16_INDEXING_H_
+#endif // UI_GFX_UTF16_INDEXING_H_
diff --git a/ui/base/text/utf16_indexing_unittest.cc b/ui/gfx/utf16_indexing_unittest.cc
index 1bf8c30..da2f8f5b 100644
--- a/ui/base/text/utf16_indexing_unittest.cc
+++ b/ui/gfx/utf16_indexing_unittest.cc
@@ -3,9 +3,9 @@
// found in the LICENSE file.
#include "testing/gtest/include/gtest/gtest.h"
-#include "ui/base/text/utf16_indexing.h"
+#include "ui/gfx/utf16_indexing.h"
-namespace ui {
+namespace gfx {
TEST(UTF16IndexingTest, IndexOffsetConversions) {
// Valid surrogate pair surrounded by unpaired surrogates
@@ -29,4 +29,4 @@ TEST(UTF16IndexingTest, IndexOffsetConversions) {
}
}
-} // namespace ui
+} // namespace gfx
diff --git a/ui/gfx/dpi_win.cc b/ui/gfx/win/dpi.cc
index 51972d2..98d23bd 100644
--- a/ui/gfx/dpi_win.cc
+++ b/ui/gfx/win/dpi.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "ui/gfx/dpi_win.h"
+#include "ui/gfx/win/dpi.h"
#include <windows.h>
#include "base/command_line.h"
@@ -25,9 +25,9 @@ int kDefaultDPIY = 96;
bool IsHighDPIEnabled() {
// Default is disabled.
if (CommandLine::ForCurrentProcess()->HasSwitch(
- gfx::switches::kHighDPISupport)) {
+ switches::kHighDPISupport)) {
return CommandLine::ForCurrentProcess()->GetSwitchValueASCII(
- gfx::switches::kHighDPISupport).compare("1") == 0;
+ switches::kHighDPISupport).compare("1") == 0;
}
return false;
}
diff --git a/ui/gfx/dpi_win.h b/ui/gfx/win/dpi.h
index a056f53..a056f53 100644
--- a/ui/gfx/dpi_win.h
+++ b/ui/gfx/win/dpi.h
diff --git a/ui/base/win/hwnd_util.cc b/ui/gfx/win/hwnd_util.cc
index 0a8dfb2..91f0ddd 100644
--- a/ui/base/win/hwnd_util.cc
+++ b/ui/gfx/win/hwnd_util.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "ui/base/win/hwnd_util.h"
+#include "ui/gfx/win/hwnd_util.h"
#include "base/i18n/rtl.h"
#include "base/strings/string_util.h"
@@ -12,7 +12,7 @@
#include "ui/gfx/rect.h"
#include "ui/gfx/size.h"
-namespace ui {
+namespace gfx {
namespace {
@@ -25,9 +25,9 @@ void AdjustWindowToFit(HWND hwnd, const RECT& bounds, bool fit_to_monitor) {
MONITORINFO mi;
mi.cbSize = sizeof(mi);
base::win::GetMonitorInfoWrapper(hmon, &mi);
- gfx::Rect window_rect(bounds);
- gfx::Rect monitor_rect(mi.rcWork);
- gfx::Rect new_window_rect = window_rect;
+ Rect window_rect(bounds);
+ Rect monitor_rect(mi.rcWork);
+ Rect new_window_rect = window_rect;
new_window_rect.AdjustToFit(monitor_rect);
if (new_window_rect != window_rect) {
// Window doesn't fit on monitor, move and possibly resize.
@@ -115,7 +115,7 @@ bool DoesWindowBelongToActiveWindow(HWND window) {
void CenterAndSizeWindow(HWND parent,
HWND window,
- const gfx::Size& pref) {
+ const Size& pref) {
DCHECK(window && pref.width() > 0 && pref.height() > 0);
// Calculate the ideal bounds.
@@ -177,13 +177,13 @@ void CheckWindowCreated(HWND hwnd) {
void ShowSystemMenu(HWND window) {
RECT rect;
GetWindowRect(window, &rect);
- gfx::Point point = gfx::Point(rect.left, rect.top);
+ Point point = Point(rect.left, rect.top);
static const int kSystemMenuOffset = 10;
point.Offset(kSystemMenuOffset, kSystemMenuOffset);
ShowSystemMenuAtPoint(window, point);
}
-void ShowSystemMenuAtPoint(HWND window, const gfx::Point& point) {
+void ShowSystemMenuAtPoint(HWND window, const Point& point) {
// In the Metro process, we never want to show the system menu.
if (base::win::IsMetroProcess())
return;
@@ -211,4 +211,4 @@ HWND GetWindowToParentTo(bool get_real_hwnd) {
return root_window();
}
-} // namespace ui
+} // namespace gfx
diff --git a/ui/base/win/hwnd_util.h b/ui/gfx/win/hwnd_util.h
index ece1d3c..70e5f8f 100644
--- a/ui/base/win/hwnd_util.h
+++ b/ui/gfx/win/hwnd_util.h
@@ -2,20 +2,17 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef UI_BASE_WIN_HWND_UTIL_H_
-#define UI_BASE_WIN_HWND_UTIL_H_
+#ifndef UI_GFX_WIN_HWND_UTIL_H_
+#define UI_GFX_WIN_HWND_UTIL_H_
#include <windows.h>
#include "base/strings/string16.h"
-#include "ui/base/ui_export.h"
+#include "ui/gfx/gfx_export.h"
namespace gfx {
class Point;
class Size;
-}
-
-namespace ui {
// A version of the GetClassNameW API that returns the class name in an
// string16. An empty result indicates a failure to get the class name.
@@ -52,6 +49,6 @@ UI_EXPORT void ShowSystemMenuAtPoint(HWND window, const gfx::Point& point);
// container so in those cases you should pass true in |get_real_hwnd|.
UI_EXPORT HWND GetWindowToParentTo(bool get_real_hwnd);
-} // namespace ui
+} // namespace gfx
-#endif // UI_BASE_WIN_HWND_UTIL_H_
+#endif // UI_GFX_WIN_HWND_UTIL_H_
diff --git a/ui/base/win/scoped_set_map_mode.h b/ui/gfx/win/scoped_set_map_mode.h
index bf2b78d..910837d 100644
--- a/ui/base/win/scoped_set_map_mode.h
+++ b/ui/gfx/win/scoped_set_map_mode.h
@@ -2,15 +2,15 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef UI_BASE_WIN_SCOPED_SET_MAP_MODE_H_
-#define UI_BASE_WIN_SCOPED_SET_MAP_MODE_H_
+#ifndef UI_GFX_WIN_SCOPED_SET_MAP_MODE_H_
+#define UI_GFX_WIN_SCOPED_SET_MAP_MODE_H_
#include <windows.h>
#include "base/basictypes.h"
#include "base/logging.h"
-namespace ui {
+namespace gfx {
// Helper class for setting and restore the map mode on a DC.
class ScopedSetMapMode {
@@ -35,6 +35,6 @@ class ScopedSetMapMode {
DISALLOW_COPY_AND_ASSIGN(ScopedSetMapMode);
};
-} // namespace ui
+} // namespace gfx
-#endif // UI_BASE_WIN_SCOPED_SET_MAP_MODE_H_
+#endif // UI_GFX_WIN_SCOPED_SET_MAP_MODE_H_
diff --git a/ui/base/win/singleton_hwnd.cc b/ui/gfx/win/singleton_hwnd.cc
index 9d1685f..37993e8 100644
--- a/ui/base/win/singleton_hwnd.cc
+++ b/ui/gfx/win/singleton_hwnd.cc
@@ -2,12 +2,12 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "ui/base/win/singleton_hwnd.h"
+#include "ui/gfx/win/singleton_hwnd.h"
#include "base/memory/singleton.h"
#include "base/message_loop/message_loop.h"
-namespace ui {
+namespace gfx {
// static
SingletonHwnd* SingletonHwnd::GetInstance() {
@@ -23,7 +23,7 @@ void SingletonHwnd::AddObserver(Observer* observer) {
DLOG(ERROR) << "Cannot create windows on non-UI thread!";
return;
}
- WindowImpl::Init(NULL, gfx::Rect());
+ WindowImpl::Init(NULL, Rect());
}
observer_list_.AddObserver(observer);
}
@@ -52,4 +52,4 @@ SingletonHwnd::SingletonHwnd() {
SingletonHwnd::~SingletonHwnd() {
}
-} // namespace ui
+} // namespace gfx
diff --git a/ui/base/win/singleton_hwnd.h b/ui/gfx/win/singleton_hwnd.h
index a84b6c0..96af6e7 100644
--- a/ui/base/win/singleton_hwnd.h
+++ b/ui/gfx/win/singleton_hwnd.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef UI_BASE_WIN_SINGLETON_HWND_H_
-#define UI_BASE_WIN_SINGLETON_HWND_H_
+#ifndef UI_GFX_WIN_SINGLETON_HWND_H_
+#define UI_GFX_WIN_SINGLETON_HWND_H_
#include <windows.h>
#include <vector>
@@ -11,11 +11,11 @@
#include "base/basictypes.h"
#include "base/callback_forward.h"
#include "base/observer_list.h"
-#include "ui/base/win/window_impl.h"
+#include "ui/gfx/win/window_impl.h"
template<typename T> struct DefaultSingletonTraits;
-namespace ui {
+namespace gfx {
// Singleton message-only HWND that allows interested clients to receive WM_*
// notifications.
@@ -56,6 +56,6 @@ class SingletonHwnd : public WindowImpl {
DISALLOW_COPY_AND_ASSIGN(SingletonHwnd);
};
-} // namespace ui
+} // namespace gfx
-#endif // UI_BASE_WIN_SINGLETON_HWND_H_
+#endif // UI_GFX_WIN_SINGLETON_HWND_H_
diff --git a/ui/base/win/window_impl.cc b/ui/gfx/win/window_impl.cc
index 22ed535..e2e6af0 100644
--- a/ui/base/win/window_impl.cc
+++ b/ui/gfx/win/window_impl.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "ui/base/win/window_impl.h"
+#include "ui/gfx/win/window_impl.h"
#include <list>
@@ -11,9 +11,9 @@
#include "base/strings/string_number_conversions.h"
#include "base/synchronization/lock.h"
#include "base/win/wrapped_window_proc.h"
-#include "ui/base/win/hwnd_util.h"
+#include "ui/gfx/win/hwnd_util.h"
-namespace ui {
+namespace gfx {
static const DWORD kWindowDefaultChildStyle =
WS_CHILD | WS_VISIBLE | WS_CLIPCHILDREN | WS_CLIPSIBLINGS;
@@ -149,7 +149,7 @@ WindowImpl::~WindowImpl() {
ClearUserData();
}
-void WindowImpl::Init(HWND parent, const gfx::Rect& bounds) {
+void WindowImpl::Init(HWND parent, const Rect& bounds) {
if (window_style_ == 0)
window_style_ = parent ? kWindowDefaultChildStyle : kWindowDefaultStyle;
@@ -216,7 +216,7 @@ void WindowImpl::Init(HWND parent, const gfx::Rect& bounds) {
CheckWindowCreated(hwnd_);
// The window procedure should have set the data for us.
- CHECK_EQ(this, ui::GetWindowUserData(hwnd));
+ CHECK_EQ(this, GetWindowUserData(hwnd));
}
HICON WindowImpl::GetDefaultWindowIcon() const {
@@ -236,7 +236,7 @@ LRESULT WindowImpl::OnWndProc(UINT message, WPARAM w_param, LPARAM l_param) {
void WindowImpl::ClearUserData() {
if (::IsWindow(hwnd_))
- ui::SetWindowUserData(hwnd_, NULL);
+ gfx::SetWindowUserData(hwnd_, NULL);
}
// static
@@ -248,7 +248,7 @@ LRESULT CALLBACK WindowImpl::WndProc(HWND hwnd,
CREATESTRUCT* cs = reinterpret_cast<CREATESTRUCT*>(l_param);
WindowImpl* window = reinterpret_cast<WindowImpl*>(cs->lpCreateParams);
DCHECK(window);
- ui::SetWindowUserData(hwnd, window);
+ gfx::SetWindowUserData(hwnd, window);
window->hwnd_ = hwnd;
window->got_create_ = true;
if (hwnd)
@@ -256,8 +256,7 @@ LRESULT CALLBACK WindowImpl::WndProc(HWND hwnd,
return TRUE;
}
- WindowImpl* window = reinterpret_cast<WindowImpl*>(
- ui::GetWindowUserData(hwnd));
+ WindowImpl* window = reinterpret_cast<WindowImpl*>(GetWindowUserData(hwnd));
if (!window)
return 0;
@@ -270,4 +269,4 @@ ATOM WindowImpl::GetWindowClassAtom() {
return ClassRegistrar::GetInstance()->RetrieveClassAtom(class_info);
}
-} // namespace ui
+} // namespace gfx
diff --git a/ui/base/win/window_impl.h b/ui/gfx/win/window_impl.h
index 1f3b5d3..2b0018e 100644
--- a/ui/base/win/window_impl.h
+++ b/ui/gfx/win/window_impl.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef UI_BASE_WIN_WINDOW_IMPL_H_
-#define UI_BASE_WIN_WINDOW_IMPL_H_
+#ifndef UI_GFX_WIN_WINDOW_IMPL_H_
+#define UI_GFX_WIN_WINDOW_IMPL_H_
#include <atlbase.h>
#include <atlapp.h>
@@ -13,11 +13,11 @@
#include <string>
#include "base/logging.h"
-#include "ui/base/ui_export.h"
+#include "ui/gfx/gfx_export.h"
#include "ui/gfx/native_widget_types.h"
#include "ui/gfx/rect.h"
-namespace ui {
+namespace gfx {
// An interface implemented by classes that use message maps.
// ProcessWindowMessage is implemented by the BEGIN_MESSAGE_MAP_EX macro.
@@ -118,6 +118,6 @@ class UI_EXPORT WindowImpl : public MessageMapInterface {
DISALLOW_COPY_AND_ASSIGN(WindowImpl);
};
-} // namespace ui
+} // namespace gfx
-#endif // UI_BASE_WIN_WINDOW_IMPL_H_
+#endif // UI_GFX_WIN_WINDOW_IMPL_H_
diff --git a/ui/native_theme/native_theme_win.cc b/ui/native_theme/native_theme_win.cc
index 79081b7..74b4f14 100644
--- a/ui/native_theme/native_theme_win.cc
+++ b/ui/native_theme/native_theme_win.cc
@@ -24,11 +24,11 @@
#include "third_party/skia/include/core/SkColorPriv.h"
#include "third_party/skia/include/core/SkShader.h"
#include "ui/gfx/color_utils.h"
-#include "ui/gfx/dpi_win.h"
#include "ui/gfx/gdi_util.h"
#include "ui/gfx/rect.h"
#include "ui/gfx/rect_conversions.h"
#include "ui/gfx/sys_color_change_listener.h"
+#include "ui/gfx/win/dpi.h"
#include "ui/native_theme/common_theme.h"
// This was removed from Winvers.h but is still used.
diff --git a/ui/surface/accelerated_surface_win.cc b/ui/surface/accelerated_surface_win.cc
index 502678b..3faf01d 100644
--- a/ui/surface/accelerated_surface_win.cc
+++ b/ui/surface/accelerated_surface_win.cc
@@ -26,10 +26,10 @@
#include "media/base/video_util.h"
#include "third_party/skia/include/core/SkBitmap.h"
#include "ui/base/latency_info.h"
-#include "ui/base/win/hwnd_util.h"
#include "ui/base/win/shell.h"
-#include "ui/gfx/dpi_win.h"
#include "ui/gfx/rect.h"
+#include "ui/gfx/win/dpi.h"
+#include "ui/gfx/win/hwnd_util.h"
#include "ui/gl/gl_switches.h"
#include "ui/surface/accelerated_surface_transformer_win.h"
#include "ui/surface/d3d9_utils_win.h"
diff --git a/ui/ui.gyp b/ui/ui.gyp
index 668086e..9d14e88 100644
--- a/ui/ui.gyp
+++ b/ui/ui.gyp
@@ -315,8 +315,6 @@
'base/resource/resource_handle.h',
'base/text/bytes_formatting.cc',
'base/text/bytes_formatting.h',
- 'base/text/utf16_indexing.cc',
- 'base/text/utf16_indexing.h',
'base/theme_provider.cc',
'base/theme_provider.h',
'base/touch/touch_device.cc',
@@ -355,23 +353,16 @@
'base/win/hidden_window.h',
'base/win/hwnd_subclass.cc',
'base/win/hwnd_subclass.h',
- 'base/win/hwnd_util.cc',
- 'base/win/hwnd_util.h',
'base/win/message_box_win.cc',
'base/win/message_box_win.h',
'base/win/mouse_wheel_util.cc',
'base/win/mouse_wheel_util.h',
'base/win/scoped_ole_initializer.cc',
'base/win/scoped_ole_initializer.h',
- 'base/win/scoped_set_map_mode.h',
'base/win/shell.cc',
'base/win/shell.h',
- 'base/win/singleton_hwnd.cc',
- 'base/win/singleton_hwnd.h',
'base/win/touch_input.cc',
'base/win/touch_input.h',
- 'base/win/window_impl.cc',
- 'base/win/window_impl.h',
'base/window_open_disposition.cc',
'base/window_open_disposition.h',
'base/work_area_watcher_observer.h',
@@ -435,8 +426,6 @@
'gfx/display.h',
'gfx/display_observer.cc',
'gfx/display_observer.h',
- 'gfx/dpi_win.cc',
- 'gfx/dpi_win.h',
'gfx/favicon_size.cc',
'gfx/favicon_size.h',
'gfx/font.cc',
@@ -591,6 +580,8 @@
'gfx/transform.h',
'gfx/transform_util.cc',
'gfx/transform_util.h',
+ 'gfx/utf16_indexing.cc',
+ 'gfx/utf16_indexing.h',
'gfx/vector2d.cc',
'gfx/vector2d.h',
'gfx/vector2d_conversions.cc',
@@ -599,6 +590,15 @@
'gfx/vector2d_f.h',
'gfx/vector3d_f.cc',
'gfx/vector3d_f.h',
+ 'gfx/win/dpi.cc',
+ 'gfx/win/dpi.h',
+ 'gfx/win/hwnd_util.cc',
+ 'gfx/win/hwnd_util.h',
+ 'gfx/win/scoped_set_map_mode.h',
+ 'gfx/win/singleton_hwnd.cc',
+ 'gfx/win/singleton_hwnd.h',
+ 'gfx/win/window_impl.cc',
+ 'gfx/win/window_impl.h',
'webui/jstemplate_builder.cc',
'webui/jstemplate_builder.h',
'webui/web_ui_util.cc',
diff --git a/ui/ui_unittests.gypi b/ui/ui_unittests.gypi
index 8c9771b..28e89645 100644
--- a/ui/ui_unittests.gypi
+++ b/ui/ui_unittests.gypi
@@ -165,7 +165,6 @@
'base/ozone/evdev/touch_event_converter_ozone_unittest.cc',
'base/test/data/resource.h',
'base/text/bytes_formatting_unittest.cc',
- 'base/text/utf16_indexing_unittest.cc',
'base/view_prop_unittest.cc',
'gfx/blit_unittest.cc',
'gfx/break_list_unittest.cc',
@@ -178,6 +177,7 @@
'gfx/platform_font_mac_unittest.mm',
'gfx/render_text_unittest.cc',
'gfx/transform_util_unittest.cc',
+ 'gfx/utf16_indexing_unittest.cc',
'shell_dialogs/select_file_dialog_win_unittest.cc',
'webui/web_ui_util_unittest.cc',
],
diff --git a/ui/views/controls/combobox/native_combobox_win.cc b/ui/views/controls/combobox/native_combobox_win.cc
index 3093c53..a810d85 100644
--- a/ui/views/controls/combobox/native_combobox_win.cc
+++ b/ui/views/controls/combobox/native_combobox_win.cc
@@ -9,8 +9,8 @@
#include "ui/base/events/event.h"
#include "ui/base/models/combobox_model.h"
#include "ui/base/resource/resource_bundle.h"
-#include "ui/base/win/hwnd_util.h"
#include "ui/gfx/font.h"
+#include "ui/gfx/win/hwnd_util.h"
#include "ui/native_theme/native_theme_win.h"
#include "ui/views/controls/combobox/combobox.h"
#include "ui/views/controls/combobox/native_combobox_views.h"
@@ -188,7 +188,7 @@ void NativeComboboxWin::CreateNativeControl() {
flags, 0, 0, width(), height(),
GetWidget()->GetNativeView(), NULL, NULL,
NULL);
- ui::CheckWindowCreated(control_hwnd);
+ gfx::CheckWindowCreated(control_hwnd);
NativeControlCreated(control_hwnd);
}
diff --git a/ui/views/controls/menu/menu_win.cc b/ui/views/controls/menu/menu_win.cc
index 3ff01b8..d75402b 100644
--- a/ui/views/controls/menu/menu_win.cc
+++ b/ui/views/controls/menu/menu_win.cc
@@ -13,10 +13,10 @@
#include "ui/base/keycodes/keyboard_codes.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/base/l10n/l10n_util_win.h"
-#include "ui/base/win/window_impl.h"
#include "ui/gfx/canvas.h"
#include "ui/gfx/font.h"
#include "ui/gfx/rect.h"
+#include "ui/gfx/win/window_impl.h"
namespace views {
@@ -62,7 +62,7 @@ static int ChromeGetMenuItemID(HMENU hMenu, int pos) {
// to intercept right clicks on the HMENU and notify the delegate as well as
// for drawing icons.
//
-class MenuHostWindow : public ui::WindowImpl {
+class MenuHostWindow : public gfx::WindowImpl {
public:
MenuHostWindow(MenuWin* menu, HWND parent_window) : menu_(menu) {
int extended_style = 0;
diff --git a/ui/views/controls/menu/native_menu_win.cc b/ui/views/controls/menu/native_menu_win.cc
index e357b1e..10ff3a3 100644
--- a/ui/views/controls/menu/native_menu_win.cc
+++ b/ui/views/controls/menu/native_menu_win.cc
@@ -17,12 +17,12 @@
#include "ui/base/l10n/l10n_util.h"
#include "ui/base/l10n/l10n_util_win.h"
#include "ui/base/models/menu_model.h"
-#include "ui/base/win/hwnd_util.h"
#include "ui/gfx/canvas.h"
#include "ui/gfx/font.h"
#include "ui/gfx/image/image.h"
#include "ui/gfx/image/image_skia.h"
#include "ui/gfx/rect.h"
+#include "ui/gfx/win/hwnd_util.h"
#include "ui/native_theme/native_theme.h"
#include "ui/native_theme/native_theme_win.h"
#include "ui/views/controls/menu/menu_2.h"
@@ -81,8 +81,8 @@ class NativeMenuWin::MenuHostWindow {
RegisterClass();
hwnd_ = CreateWindowEx(l10n_util::GetExtendedStyles(), kWindowClassName,
L"", 0, 0, 0, 0, 0, HWND_MESSAGE, NULL, NULL, NULL);
- ui::CheckWindowCreated(hwnd_);
- ui::SetWindowUserData(hwnd_, this);
+ gfx::CheckWindowCreated(hwnd_);
+ gfx::SetWindowUserData(hwnd_, this);
}
~MenuHostWindow() {
@@ -350,7 +350,7 @@ class NativeMenuWin::MenuHostWindow {
WPARAM w_param,
LPARAM l_param) {
MenuHostWindow* host =
- reinterpret_cast<MenuHostWindow*>(ui::GetWindowUserData(window));
+ reinterpret_cast<MenuHostWindow*>(gfx::GetWindowUserData(window));
// host is null during initial construction.
LRESULT l_result = 0;
if (!host || !host->ProcessWindowMessage(window, message, w_param, l_param,
diff --git a/ui/views/controls/native/native_view_host_win.cc b/ui/views/controls/native/native_view_host_win.cc
index da71d06..e7b74c3 100644
--- a/ui/views/controls/native/native_view_host_win.cc
+++ b/ui/views/controls/native/native_view_host_win.cc
@@ -8,9 +8,9 @@
#include "base/logging.h"
#include "ui/base/win/hidden_window.h"
-#include "ui/base/win/window_impl.h"
#include "ui/gfx/canvas.h"
-#include "ui/gfx/dpi_win.h"
+#include "ui/gfx/win/dpi.h"
+#include "ui/gfx/win/window_impl.h"
#include "ui/views/controls/native/native_view_host.h"
#include "ui/views/focus/focus_manager.h"
#include "ui/views/widget/native_widget.h"
diff --git a/ui/views/controls/native_control.cc b/ui/views/controls/native_control.cc
index e6219e7..e450463 100644
--- a/ui/views/controls/native_control.cc
+++ b/ui/views/controls/native_control.cc
@@ -17,7 +17,7 @@
#include "ui/base/keycodes/keyboard_codes.h"
#include "ui/base/l10n/l10n_util_win.h"
#include "ui/base/view_prop.h"
-#include "ui/base/win/hwnd_util.h"
+#include "ui/gfx/win/hwnd_util.h"
#include "ui/views/background.h"
#include "ui/views/controls/native/native_view_host.h"
#include "ui/views/focus/focus_manager.h"
@@ -88,7 +88,7 @@ class NativeControlContainer : public CWindowImpl<NativeControlContainer,
control_ = parent_->CreateNativeControl(m_hWnd);
// We subclass the control hwnd so we get the WM_KEYDOWN messages.
- original_handler_ = ui::SetWindowProc(
+ original_handler_ = gfx::SetWindowProc(
control_, &NativeControl::NativeControlWndProc);
prop_.reset(new ViewProp(control_, kNativeControlKey , parent_));
@@ -378,7 +378,7 @@ LRESULT CALLBACK NativeControl::NativeControlWndProc(HWND window,
NOTREACHED();
}
} else if (message == WM_DESTROY) {
- ui::SetWindowProc(window, reinterpret_cast<WNDPROC>(original_handler));
+ gfx::SetWindowProc(window, reinterpret_cast<WNDPROC>(original_handler));
native_control->container_->prop_.reset();
}
diff --git a/ui/views/controls/native_control_win.cc b/ui/views/controls/native_control_win.cc
index 2b6c6d4..c50411d 100644
--- a/ui/views/controls/native_control_win.cc
+++ b/ui/views/controls/native_control_win.cc
@@ -10,7 +10,7 @@
#include "ui/base/accessibility/accessibility_types.h"
#include "ui/base/l10n/l10n_util_win.h"
#include "ui/base/view_prop.h"
-#include "ui/base/win/hwnd_util.h"
+#include "ui/gfx/win/hwnd_util.h"
#include "ui/views/controls/combobox/combobox.h"
#include "ui/views/focus/focus_manager.h"
#include "ui/views/widget/widget.h"
@@ -139,7 +139,7 @@ void NativeControlWin::NativeControlCreated(HWND native_control) {
props_.push_back(ChildWindowMessageProcessor::Register(native_control, this));
// Subclass so we get WM_KEYDOWN and WM_SETFOCUS messages.
- original_wndproc_ = ui::SetWindowProc(
+ original_wndproc_ = gfx::SetWindowProc(
native_control, &NativeControlWin::NativeControlWndProc);
Attach(native_control);
@@ -216,7 +216,7 @@ LRESULT NativeControlWin::NativeControlWndProc(HWND window,
}
} else if (message == WM_DESTROY) {
native_control->props_.clear();
- ui::SetWindowProc(window, native_control->original_wndproc_);
+ gfx::SetWindowProc(window, native_control->original_wndproc_);
}
return CallWindowProc(native_control->original_wndproc_, window, message,
diff --git a/ui/views/controls/textfield/native_textfield_win.cc b/ui/views/controls/textfield/native_textfield_win.cc
index c96f3cb..99cf074 100644
--- a/ui/views/controls/textfield/native_textfield_win.cc
+++ b/ui/views/controls/textfield/native_textfield_win.cc
@@ -22,9 +22,9 @@
#include "ui/base/keycodes/keyboard_codes.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/base/l10n/l10n_util_win.h"
-#include "ui/base/win/hwnd_util.h"
#include "ui/base/win/mouse_wheel_util.h"
#include "ui/gfx/range/range.h"
+#include "ui/gfx/win/hwnd_util.h"
#include "ui/native_theme/native_theme_win.h"
#include "ui/views/controls/label.h"
#include "ui/views/controls/menu/menu_item_view.h"
@@ -1103,7 +1103,7 @@ void NativeTextfieldWin::OnSysChar(TCHAR ch, UINT repeat_count, UINT flags) {
// something useful, so discard those. Note that [Ctrl]+[Alt]+<xxx> generates
// WM_CHAR instead of WM_SYSCHAR, so it is not handled here.
if (ch == VK_SPACE) {
- ui::ShowSystemMenu(
+ gfx::ShowSystemMenu(
container_view_->GetWidget()->GetTopLevelWidget()->GetNativeWindow());
}
}
diff --git a/ui/views/controls/textfield/textfield_views_model.cc b/ui/views/controls/textfield/textfield_views_model.cc
index 4db0c75..dae5684 100644
--- a/ui/views/controls/textfield/textfield_views_model.cc
+++ b/ui/views/controls/textfield/textfield_views_model.cc
@@ -12,12 +12,12 @@
#include "base/strings/utf_string_conversions.h"
#include "ui/base/clipboard/clipboard.h"
#include "ui/base/clipboard/scoped_clipboard_writer.h"
-#include "ui/base/text/utf16_indexing.h"
#include "ui/gfx/canvas.h"
#include "ui/gfx/font.h"
#include "ui/gfx/range/range.h"
#include "ui/gfx/render_text.h"
#include "ui/gfx/text_constants.h"
+#include "ui/gfx/utf16_indexing.h"
#include "ui/views/controls/textfield/textfield.h"
namespace views {
@@ -384,7 +384,7 @@ bool TextfieldViewsModel::Backspace() {
if (cursor_position > 0) {
// Delete one code point, which may be two UTF-16 words.
size_t previous_char =
- ui::UTF16OffsetToIndex(GetText(), cursor_position, -1);
+ gfx::UTF16OffsetToIndex(GetText(), cursor_position, -1);
ExecuteAndRecordDelete(gfx::Range(cursor_position, previous_char), true);
return true;
}
diff --git a/ui/views/widget/aero_tooltip_manager.cc b/ui/views/widget/aero_tooltip_manager.cc
index 504ae48..c54124c 100644
--- a/ui/views/widget/aero_tooltip_manager.cc
+++ b/ui/views/widget/aero_tooltip_manager.cc
@@ -11,9 +11,9 @@
#include "base/bind.h"
#include "base/message_loop/message_loop.h"
#include "ui/base/l10n/l10n_util_win.h"
-#include "ui/base/win/hwnd_util.h"
-#include "ui/gfx/dpi_win.h"
#include "ui/gfx/point.h"
+#include "ui/gfx/win/dpi.h"
+#include "ui/gfx/win/hwnd_util.h"
namespace views {
diff --git a/ui/views/widget/desktop_aura/desktop_root_window_host_win.cc b/ui/views/widget/desktop_aura/desktop_root_window_host_win.cc
index b9915ba..8f6720a 100644
--- a/ui/views/widget/desktop_aura/desktop_root_window_host_win.cc
+++ b/ui/views/widget/desktop_aura/desktop_root_window_host_win.cc
@@ -16,10 +16,10 @@
#include "ui/base/ime/input_method.h"
#include "ui/base/ime/win/tsf_bridge.h"
#include "ui/base/win/shell.h"
-#include "ui/gfx/dpi_win.h"
#include "ui/gfx/insets.h"
#include "ui/gfx/native_widget_types.h"
#include "ui/gfx/path_win.h"
+#include "ui/gfx/win/dpi.h"
#include "ui/native_theme/native_theme_aura.h"
#include "ui/native_theme/native_theme_win.h"
#include "ui/views/corewm/compound_event_filter.h"
diff --git a/ui/views/widget/native_widget_win.cc b/ui/views/widget/native_widget_win.cc
index ebfa66f..87d75cf 100644
--- a/ui/views/widget/native_widget_win.cc
+++ b/ui/views/widget/native_widget_win.cc
@@ -24,16 +24,16 @@
#include "ui/base/l10n/l10n_util_win.h"
#include "ui/base/theme_provider.h"
#include "ui/base/view_prop.h"
-#include "ui/base/win/hwnd_util.h"
#include "ui/base/win/mouse_wheel_util.h"
#include "ui/base/win/shell.h"
#include "ui/gfx/canvas.h"
#include "ui/gfx/canvas_skia_paint.h"
-#include "ui/gfx/dpi_win.h"
#include "ui/gfx/path.h"
#include "ui/gfx/point_conversions.h"
#include "ui/gfx/screen.h"
#include "ui/gfx/size_conversions.h"
+#include "ui/gfx/win/dpi.h"
+#include "ui/gfx/win/hwnd_util.h"
#include "ui/native_theme/native_theme.h"
#include "ui/views/controls/native_control_win.h"
#include "ui/views/controls/textfield/textfield.h"
diff --git a/ui/views/widget/native_widget_win.h b/ui/views/widget/native_widget_win.h
index bc24630..cadc6fd 100644
--- a/ui/views/widget/native_widget_win.h
+++ b/ui/views/widget/native_widget_win.h
@@ -11,7 +11,7 @@
#include "base/memory/scoped_vector.h"
#include "base/win/scoped_comptr.h"
#include "base/win/win_util.h"
-#include "ui/base/win/window_impl.h"
+#include "ui/gfx/win/window_impl.h"
#include "ui/views/widget/native_widget_private.h"
#include "ui/views/win/hwnd_message_handler_delegate.h"
diff --git a/ui/views/widget/tooltip_manager_win.cc b/ui/views/widget/tooltip_manager_win.cc
index 4c0a241..362ff33 100644
--- a/ui/views/widget/tooltip_manager_win.cc
+++ b/ui/views/widget/tooltip_manager_win.cc
@@ -16,11 +16,11 @@
#include "base/win/scoped_hdc.h"
#include "base/win/scoped_select_object.h"
#include "ui/base/l10n/l10n_util_win.h"
-#include "ui/base/win/hwnd_util.h"
-#include "ui/base/win/scoped_set_map_mode.h"
-#include "ui/gfx/dpi_win.h"
#include "ui/gfx/font_list.h"
#include "ui/gfx/screen.h"
+#include "ui/gfx/win/dpi.h"
+#include "ui/gfx/win/hwnd_util.h"
+#include "ui/gfx/win/scoped_set_map_mode.h"
#include "ui/views/view.h"
#include "ui/views/widget/monitor_win.h"
#include "ui/views/widget/widget.h"
@@ -257,7 +257,7 @@ int TooltipManagerWin::CalcTooltipHeight() {
if (hfont != NULL) {
base::win::ScopedGetDC dc(tooltip_hwnd_);
base::win::ScopedSelectObject font(dc, hfont);
- ui::ScopedSetMapMode mode(dc, MM_TEXT);
+ gfx::ScopedSetMapMode mode(dc, MM_TEXT);
TEXTMETRIC font_metrics;
GetTextMetrics(dc, &font_metrics);
height = font_metrics.tmHeight;
diff --git a/ui/views/win/hwnd_message_handler.cc b/ui/views/win/hwnd_message_handler.cc
index d2a6804..e8823f2 100644
--- a/ui/views/win/hwnd_message_handler.cc
+++ b/ui/views/win/hwnd_message_handler.cc
@@ -16,18 +16,18 @@
#include "ui/base/gestures/gesture_sequence.h"
#include "ui/base/keycodes/keyboard_code_conversion_win.h"
#include "ui/base/touch/touch_enabled.h"
-#include "ui/base/win/hwnd_util.h"
#include "ui/base/win/mouse_wheel_util.h"
#include "ui/base/win/shell.h"
#include "ui/base/win/touch_input.h"
#include "ui/gfx/canvas.h"
#include "ui/gfx/canvas_skia_paint.h"
-#include "ui/gfx/dpi_win.h"
#include "ui/gfx/icon_util.h"
#include "ui/gfx/insets.h"
#include "ui/gfx/path.h"
#include "ui/gfx/path_win.h"
#include "ui/gfx/screen.h"
+#include "ui/gfx/win/dpi.h"
+#include "ui/gfx/win/hwnd_util.h"
#include "ui/native_theme/native_theme_win.h"
#include "ui/views/views_delegate.h"
#include "ui/views/widget/monitor_win.h"
@@ -543,7 +543,7 @@ void HWNDMessageHandler::CenterWindow(const gfx::Size& size) {
HWND parent = GetParent(hwnd());
if (!IsWindow(hwnd()))
parent = ::GetWindow(hwnd(), GW_OWNER);
- ui::CenterAndSizeWindow(parent, hwnd(), size);
+ gfx::CenterAndSizeWindow(parent, hwnd(), size);
}
void HWNDMessageHandler::SetRegion(HRGN region) {
@@ -844,7 +844,7 @@ void HWNDMessageHandler::DispatchKeyEventPostIME(const ui::KeyEvent& key) {
}
////////////////////////////////////////////////////////////////////////////////
-// HWNDMessageHandler, ui::WindowImpl overrides:
+// HWNDMessageHandler, gfx::WindowImpl overrides:
HICON HWNDMessageHandler::GetDefaultWindowIcon() const {
if (use_system_default_icon_)
@@ -1526,7 +1526,7 @@ LRESULT HWNDMessageHandler::OnMouseRange(UINT message,
w_param = SendMessage(hwnd(), WM_NCHITTEST, 0,
MAKELPARAM(screen_point.x, screen_point.y));
if (w_param == HTCAPTION || w_param == HTSYSMENU) {
- ui::ShowSystemMenuAtPoint(hwnd(), gfx::Point(screen_point));
+ gfx::ShowSystemMenuAtPoint(hwnd(), gfx::Point(screen_point));
return 0;
}
} else if (message == WM_NCLBUTTONDOWN && delegate_->IsUsingCustomFrame()) {
diff --git a/ui/views/win/hwnd_message_handler.h b/ui/views/win/hwnd_message_handler.h
index 86b8f2e..462a937 100644
--- a/ui/views/win/hwnd_message_handler.h
+++ b/ui/views/win/hwnd_message_handler.h
@@ -23,8 +23,8 @@
#include "ui/base/accessibility/accessibility_types.h"
#include "ui/base/events/event.h"
#include "ui/base/ui_base_types.h"
-#include "ui/base/win/window_impl.h"
#include "ui/gfx/rect.h"
+#include "ui/gfx/win/window_impl.h"
#include "ui/views/ime/input_method_delegate.h"
#include "ui/views/views_export.h"
@@ -58,7 +58,7 @@ const int WM_NCUAHDRAWFRAME = 0xAF;
// implementation.
// TODO(beng): This object should eventually *become* the WindowImpl.
class VIEWS_EXPORT HWNDMessageHandler :
- public ui::WindowImpl,
+ public gfx::WindowImpl,
public internal::InputMethodDelegate,
public base::MessageLoopForUI::Observer {
public:
diff --git a/webkit/child/webthemeengine_impl_win.cc b/webkit/child/webthemeengine_impl_win.cc
index 6953372..32b071e 100644
--- a/webkit/child/webthemeengine_impl_win.cc
+++ b/webkit/child/webthemeengine_impl_win.cc
@@ -10,7 +10,7 @@
#include "skia/ext/platform_canvas.h"
#include "skia/ext/skia_utils_win.h"
#include "third_party/WebKit/public/platform/WebRect.h"
-#include "ui/gfx/dpi_win.h"
+#include "ui/gfx/win/dpi.h"
#include "ui/native_theme/native_theme.h"
using WebKit::WebCanvas;