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 /webkit | |
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 'webkit')
-rw-r--r-- | webkit/tools/test_shell/foreground_helper.h | 4 | ||||
-rw-r--r-- | webkit/tools/test_shell/test_shell_win.cc | 24 | ||||
-rw-r--r-- | webkit/tools/test_shell/webview_host_win.cc | 6 | ||||
-rw-r--r-- | webkit/tools/test_shell/webwidget_host_win.cc | 8 |
4 files changed, 21 insertions, 21 deletions
diff --git a/webkit/tools/test_shell/foreground_helper.h b/webkit/tools/test_shell/foreground_helper.h index 1050236..40332d8 100644 --- a/webkit/tools/test_shell/foreground_helper.h +++ b/webkit/tools/test_shell/foreground_helper.h @@ -5,8 +5,8 @@ #ifndef WEBKIT_TOOLS_TEST_SHELL_FOREGROUND_HELPER_H_ #define WEBKIT_TOOLS_TEST_SHELL_FOREGROUND_HELPER_H_ +#include "app/win/window_impl.h" #include "base/logging.h" -#include "gfx/window_impl.h" // Helper class for moving a window to the foreground. // Windows XP and later will not allow a window which is in the background to @@ -15,7 +15,7 @@ // to be capable of moving to the foreground. // // This is probably leveraging a windows bug. -class ForegroundHelper : public gfx::WindowImpl { +class ForegroundHelper : public app::win::WindowImpl { public: BEGIN_MSG_MAP_EX(ForegroundHelper) MESSAGE_HANDLER(WM_HOTKEY, OnHotKey) diff --git a/webkit/tools/test_shell/test_shell_win.cc b/webkit/tools/test_shell/test_shell_win.cc index 60a4b1a..2d78895 100644 --- a/webkit/tools/test_shell/test_shell_win.cc +++ b/webkit/tools/test_shell/test_shell_win.cc @@ -10,6 +10,7 @@ #include <process.h> #include <shlwapi.h> +#include "app/win/hwnd_util.h" #include "base/command_line.h" #include "base/debug/trace_event.h" #include "base/file_util.h" @@ -21,7 +22,6 @@ #include "base/string_piece.h" #include "base/string_util.h" #include "base/utf_string_conversions.h" -#include "base/win_util.h" #include "breakpad/src/client/windows/handler/exception_handler.h" #include "grit/webkit_resources.h" #include "grit/webkit_chromium_resources.h" @@ -233,7 +233,7 @@ void TestShell::DumpAllBackForwardLists(string16* result) { iter != TestShell::windowList()->end(); iter++) { HWND hwnd = *iter; TestShell* shell = - static_cast<TestShell*>(win_util::GetWindowUserData(hwnd)); + static_cast<TestShell*>(app::win::GetWindowUserData(hwnd)); shell->DumpBackForwardList(result); } } @@ -249,7 +249,7 @@ bool TestShell::RunFileTest(const TestParams& params) { HWND hwnd = *(TestShell::windowList()->begin()); TestShell* shell = - static_cast<TestShell*>(win_util::GetWindowUserData(hwnd)); + static_cast<TestShell*>(app::win::GetWindowUserData(hwnd)); // Clear focus between tests. shell->m_focusedWidgetHost = NULL; @@ -266,7 +266,7 @@ bool TestShell::RunFileTest(const TestParams& params) { // ResetTestController may have closed the window we were holding on to. // Grab the first window again. hwnd = *(TestShell::windowList()->begin()); - shell = static_cast<TestShell*>(win_util::GetWindowUserData(hwnd)); + shell = static_cast<TestShell*>(app::win::GetWindowUserData(hwnd)); DCHECK(shell); // Whether DevTools should be open before loading the page. @@ -339,8 +339,8 @@ std::string TestShell::RewriteLocalUrl(const std::string& url) { void TestShell::PlatformCleanUp() { // When the window is destroyed, tell the Edit field to forget about us, // otherwise we will crash. - win_util::SetWindowProc(m_editWnd, default_edit_wnd_proc_); - win_util::SetWindowUserData(m_editWnd, NULL); + app::win::SetWindowProc(m_editWnd, default_edit_wnd_proc_); + app::win::SetWindowUserData(m_editWnd, NULL); } void TestShell::EnableUIControl(UIControl control, bool is_enabled) { @@ -368,7 +368,7 @@ bool TestShell::Initialize(const GURL& starting_url) { WS_OVERLAPPEDWINDOW | WS_CLIPCHILDREN, CW_USEDEFAULT, 0, CW_USEDEFAULT, 0, NULL, NULL, instance_handle_, NULL); - win_util::SetWindowUserData(m_mainWnd, this); + app::win::SetWindowUserData(m_mainWnd, this); HWND hwnd; int x = 0; @@ -404,8 +404,8 @@ bool TestShell::Initialize(const GURL& starting_url) { x, 0, 0, 0, m_mainWnd, 0, instance_handle_, 0); default_edit_wnd_proc_ = - win_util::SetWindowProc(m_editWnd, TestShell::EditWndProc); - win_util::SetWindowUserData(m_editWnd, this); + app::win::SetWindowProc(m_editWnd, TestShell::EditWndProc); + app::win::SetWindowUserData(m_editWnd, this); dev_tools_agent_.reset(new TestShellDevToolsAgent()); @@ -441,7 +441,7 @@ void TestShell::TestFinished() { if (dump_when_finished_) { HWND hwnd = *(TestShell::windowList()->begin()); TestShell* shell = - static_cast<TestShell*>(win_util::GetWindowUserData(hwnd)); + static_cast<TestShell*>(app::win::GetWindowUserData(hwnd)); TestShell::Dump(shell); } @@ -578,7 +578,7 @@ void TestShell::LoadURLForFrame(const GURL& url, LRESULT CALLBACK TestShell::WndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) { - TestShell* shell = static_cast<TestShell*>(win_util::GetWindowUserData(hwnd)); + TestShell* shell = static_cast<TestShell*>(app::win::GetWindowUserData(hwnd)); switch (message) { case WM_COMMAND: @@ -676,7 +676,7 @@ LRESULT CALLBACK TestShell::WndProc(HWND hwnd, UINT message, WPARAM wParam, LRESULT CALLBACK TestShell::EditWndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) { TestShell* shell = - static_cast<TestShell*>(win_util::GetWindowUserData(hwnd)); + static_cast<TestShell*>(app::win::GetWindowUserData(hwnd)); switch (message) { case WM_CHAR: diff --git a/webkit/tools/test_shell/webview_host_win.cc b/webkit/tools/test_shell/webview_host_win.cc index d7cab2d..2d908c0 100644 --- a/webkit/tools/test_shell/webview_host_win.cc +++ b/webkit/tools/test_shell/webview_host_win.cc @@ -1,10 +1,10 @@ -// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. +// Copyright (c) 2010 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "webkit/tools/test_shell/webview_host.h" -#include "base/win_util.h" +#include "app/win/hwnd_util.h" #include "gfx/rect.h" #include "gfx/size.h" #include "skia/ext/platform_canvas.h" @@ -40,7 +40,7 @@ WebViewHost* WebViewHost::Create(HWND parent_view, WS_CHILD|WS_CLIPCHILDREN|WS_CLIPSIBLINGS, 0, 0, 0, 0, parent_view, NULL, GetModuleHandle(NULL), NULL); - win_util::SetWindowUserData(host->view_, host); + app::win::SetWindowUserData(host->view_, host); host->webwidget_ = WebView::create(delegate, dev_tools_client); prefs.Apply(host->webview()); diff --git a/webkit/tools/test_shell/webwidget_host_win.cc b/webkit/tools/test_shell/webwidget_host_win.cc index 0ead127..54e2d11 100644 --- a/webkit/tools/test_shell/webwidget_host_win.cc +++ b/webkit/tools/test_shell/webwidget_host_win.cc @@ -4,8 +4,8 @@ #include "webkit/tools/test_shell/webwidget_host.h" +#include "app/win/hwnd_util.h" #include "base/logging.h" -#include "base/win_util.h" #include "gfx/rect.h" #include "skia/ext/platform_canvas.h" #include "third_party/WebKit/WebKit/chromium/public/WebInputEvent.h" @@ -52,7 +52,7 @@ WebWidgetHost* WebWidgetHost::Create(HWND parent_view, kWindowClassName, kWindowClassName, WS_POPUP, 0, 0, 0, 0, parent_view, NULL, GetModuleHandle(NULL), NULL); - win_util::SetWindowUserData(host->view_, host); + app::win::SetWindowUserData(host->view_, host); host->webwidget_ = WebPopupMenu::create(client); @@ -60,7 +60,7 @@ WebWidgetHost* WebWidgetHost::Create(HWND parent_view, } static WebWidgetHost* FromWindow(HWND view) { - return reinterpret_cast<WebWidgetHost*>(win_util::GetWindowUserData(view)); + return reinterpret_cast<WebWidgetHost*>(app::win::GetWindowUserData(view)); } /*static*/ @@ -205,7 +205,7 @@ WebWidgetHost::WebWidgetHost() } WebWidgetHost::~WebWidgetHost() { - win_util::SetWindowUserData(view_, 0); + app::win::SetWindowUserData(view_, 0); TrackMouseLeave(false); |