diff options
author | brettw@google.com <brettw@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-12-30 15:38:47 +0000 |
---|---|---|
committer | brettw@google.com <brettw@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-12-30 15:38:47 +0000 |
commit | fff369b8be4e7df5af4f9c2cedd29234248fd35b (patch) | |
tree | 4e6494c94c2cb379273ab1beab20c0c142485601 /chrome | |
parent | c376c45bd9f166acbdc776c640161d7fbd5956a4 (diff) | |
download | chromium_src-fff369b8be4e7df5af4f9c2cedd29234248fd35b.zip chromium_src-fff369b8be4e7df5af4f9c2cedd29234248fd35b.tar.gz chromium_src-fff369b8be4e7df5af4f9c2cedd29234248fd35b.tar.bz2 |
Remove win_util::FormatMessage and FormatLastWin32Error. These were only used in a couple of diagnostic places and one can always use the "Error Lookup" utility.
Move window HWND-specific functions from base/win_util.h to a new file app/win/hwnd_util.h. I plan to put some more stuff from app/win_util into this file as well.
Move gfx/window_impl.h into app/win
TEST=it compiles
BUG=none
Review URL: http://codereview.chromium.org/6019007
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70312 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r-- | chrome/browser/aeropeek_manager.cc | 4 | ||||
-rw-r--r-- | chrome/browser/hang_monitor/hung_plugin_action.cc | 4 | ||||
-rw-r--r-- | chrome/browser/process_singleton_win.cc | 4 | ||||
-rw-r--r-- | chrome/browser/renderer_host/render_widget_host_view_win.cc | 3 | ||||
-rw-r--r-- | chrome/browser/ui/views/status_icons/status_tray_win.cc | 4 | ||||
-rw-r--r-- | chrome/default_plugin/plugin_impl_win.h | 4 | ||||
-rw-r--r-- | chrome/tools/profiles/generate_profile.cc | 7 |
7 files changed, 15 insertions, 15 deletions
diff --git a/chrome/browser/aeropeek_manager.cc b/chrome/browser/aeropeek_manager.cc index eb5e8bf..e628224 100644 --- a/chrome/browser/aeropeek_manager.cc +++ b/chrome/browser/aeropeek_manager.cc @@ -7,6 +7,7 @@ #include <dwmapi.h> #include <shobjidl.h> +#include "app/win/window_impl.h" #include "app/win_util.h" #include "base/command_line.h" #include "base/scoped_comptr_win.h" @@ -32,7 +33,6 @@ #include "chrome/installer/util/browser_distribution.h" #include "gfx/gdi_util.h" #include "gfx/icon_util.h" -#include "gfx/window_impl.h" #include "skia/ext/image_operations.h" #include "skia/ext/platform_canvas.h" #include "third_party/skia/include/core/SkBitmap.h" @@ -545,7 +545,7 @@ class SendLivePreviewTask : public Task { // * Translating received messages for TabStrip. // This class is used by the AeroPeekManager class, which is a proxy // between TabStrip and Windows 7. -class AeroPeekWindow : public gfx::WindowImpl { +class AeroPeekWindow : public app::win::WindowImpl { public: AeroPeekWindow(HWND frame_window, AeroPeekWindowDelegate* delegate, diff --git a/chrome/browser/hang_monitor/hung_plugin_action.cc b/chrome/browser/hang_monitor/hung_plugin_action.cc index 9b719ca..b7a937c 100644 --- a/chrome/browser/hang_monitor/hung_plugin_action.cc +++ b/chrome/browser/hang_monitor/hung_plugin_action.cc @@ -7,8 +7,8 @@ #include "chrome/browser/hang_monitor/hung_plugin_action.h" #include "app/l10n_util.h" +#include "app/win/hwnd_util.h" #include "app/win_util.h" -#include "base/win_util.h" #include "chrome/browser/platform_util.h" #include "chrome/common/logging_chrome.h" #include "grit/generated_resources.h" @@ -133,7 +133,7 @@ bool HungPluginAction::GetPluginName(HWND plugin_window, // static BOOL CALLBACK HungPluginAction::DismissMessageBox(HWND window, LPARAM ignore) { - std::wstring class_name = win_util::GetClassNameW(window); + string16 class_name = app::win::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/process_singleton_win.cc b/chrome/browser/process_singleton_win.cc index 1e86daa..cacbff6 100644 --- a/chrome/browser/process_singleton_win.cc +++ b/chrome/browser/process_singleton_win.cc @@ -5,6 +5,7 @@ #include "chrome/browser/process_singleton.h" #include "app/l10n_util.h" +#include "app/win/hwnd_util.h" #include "app/win_util.h" #include "base/base_paths.h" #include "base/command_line.h" @@ -12,7 +13,6 @@ #include "base/path_service.h" #include "base/process_util.h" #include "base/scoped_handle.h" -#include "base/win_util.h" #include "chrome/browser/browser_process.h" #include "chrome/browser/extensions/extensions_startup.h" #include "chrome/browser/platform_util.h" @@ -192,7 +192,7 @@ bool ProcessSingleton::Create() { 0, 0, 0, 0, 0, HWND_MESSAGE, 0, hinst, 0); DCHECK(window_); - win_util::SetWindowUserData(window_, this); + app::win::SetWindowUserData(window_, this); return true; } diff --git a/chrome/browser/renderer_host/render_widget_host_view_win.cc b/chrome/browser/renderer_host/render_widget_host_view_win.cc index 72804de..ddbd313 100644 --- a/chrome/browser/renderer_host/render_widget_host_view_win.cc +++ b/chrome/browser/renderer_host/render_widget_host_view_win.cc @@ -9,6 +9,7 @@ #include "app/l10n_util.h" #include "app/l10n_util_win.h" #include "app/resource_bundle.h" +#include "app/win/hwnd_util.h" #include "app/view_prop.h" #include "base/command_line.h" #include "base/i18n/rtl.h" @@ -1448,7 +1449,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 (win_util::GetClassName(child_window) == + if (app::win::GetClassName(child_window) == webkit::npapi::kWrapperNativeWindowClassName) child_window = ::GetWindow(child_window, GW_CHILD); 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 29ed025..53f80f9 100644 --- a/chrome/browser/ui/views/status_icons/status_tray_win.cc +++ b/chrome/browser/ui/views/status_icons/status_tray_win.cc @@ -4,7 +4,7 @@ #include "chrome/browser/views/status_icons/status_tray_win.h" -#include "base/win_util.h" +#include "app/win/hwnd_util.h" #include "chrome/browser/views/status_icons/status_icon_win.h" #include "chrome/common/chrome_constants.h" @@ -25,7 +25,7 @@ StatusTrayWin::StatusTrayWin() // Create an offscreen window for handling messages for the status icons. window_ = CreateWindow(chrome::kStatusTrayWindowClass, 0, 0, 0, 0, 0, 0, HWND_MESSAGE, 0, hinst, 0); - win_util::SetWindowUserData(window_, this); + app::win::SetWindowUserData(window_, this); } LRESULT CALLBACK StatusTrayWin::WndProcStatic(HWND hwnd, diff --git a/chrome/default_plugin/plugin_impl_win.h b/chrome/default_plugin/plugin_impl_win.h index f6aa02f..c08816b 100644 --- a/chrome/default_plugin/plugin_impl_win.h +++ b/chrome/default_plugin/plugin_impl_win.h @@ -8,10 +8,10 @@ #include <string> +#include "app/win/window_impl.h" #include "chrome/default_plugin/install_dialog.h" #include "chrome/default_plugin/plugin_database_handler.h" #include "chrome/default_plugin/plugin_install_job_monitor.h" -#include "gfx/window_impl.h" #include "third_party/npapi/bindings/npapi.h" // Possible plugin installer states. @@ -34,7 +34,7 @@ class PluginDatabaseHandler; // Provides the plugin installation functionality. This class is // instantiated with the information like the mime type of the // target plugin, the display mode, etc. -class PluginInstallerImpl : public gfx::WindowImpl { +class PluginInstallerImpl : public app::win::WindowImpl { public: static const int kRefreshPluginsMessage = WM_APP + 1; diff --git a/chrome/tools/profiles/generate_profile.cc b/chrome/tools/profiles/generate_profile.cc index 89eebbd..d87366f 100644 --- a/chrome/tools/profiles/generate_profile.cc +++ b/chrome/tools/profiles/generate_profile.cc @@ -226,9 +226,9 @@ int main(int argc, const char* argv[]) { dst_dir = current_dir.Append(dst_dir); } if (!file_util::CreateDirectory(dst_dir)) { - printf("Unable to create directory %ls: %ls\n", + printf("Unable to create directory %ls: %d\n", dst_dir.value().c_str(), - win_util::FormatLastWin32Error().c_str()); + ::GetLastError()); } icu_util::Initialize(); @@ -278,8 +278,7 @@ int main(int argc, const char* argv[]) { printf("Copying file %ls to %ls\n", path.value().c_str(), dst_file.value().c_str()); if (!file_util::CopyFile(path, dst_file)) { - printf("Copying file failed: %ls\n", - win_util::FormatLastWin32Error().c_str()); + printf("Copying file failed: %d\n", ::GetLastError()); return -1; } path = file_iterator.Next(); |