Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(168)

Side by Side Diff: webkit/tools/test_shell/foreground_helper.h

Issue 273017: Move native_widget_types and gtk_native_view_id_manager from base/gfx to... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « webkit/glue/webplugin_page_delegate.h ('k') | webkit/tools/test_shell/test_shell.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef WEBKIT_TOOLS_TEST_SHELL_FOREGROUND_HELPER_H_ 5 #ifndef WEBKIT_TOOLS_TEST_SHELL_FOREGROUND_HELPER_H_
6 #define WEBKIT_TOOLS_TEST_SHELL_FOREGROUND_HELPER_H_ 6 #define WEBKIT_TOOLS_TEST_SHELL_FOREGROUND_HELPER_H_
7 7
8 #include "app/win/window_impl.h"
8 #include "base/logging.h" 9 #include "base/logging.h"
9 #include "base/window_impl.h"
10 10
11 // Helper class for moving a window to the foreground. 11 // Helper class for moving a window to the foreground.
12 // Windows XP and later will not allow a window which is in the background to 12 // Windows XP and later will not allow a window which is in the background to
13 // move to the foreground, unless requested by the current window in the 13 // move to the foreground, unless requested by the current window in the
14 // foreground. For automated testing, we really want some of our windows 14 // foreground. For automated testing, we really want some of our windows
15 // to be capable of moving to the foreground. 15 // to be capable of moving to the foreground.
16 // 16 //
17 // This is probably leveraging a windows bug. 17 // This is probably leveraging a windows bug.
18 class ForegroundHelper : public base::WindowImpl { 18 class ForegroundHelper : public app::WindowImpl {
19 public: 19 public:
20 BEGIN_MSG_MAP_EX(ForegroundHelper) 20 BEGIN_MSG_MAP_EX(ForegroundHelper)
21 MESSAGE_HANDLER(WM_HOTKEY, OnHotKey) 21 MESSAGE_HANDLER(WM_HOTKEY, OnHotKey)
22 END_MSG_MAP() 22 END_MSG_MAP()
23 23
24 // Brings a window into the foreground. 24 // Brings a window into the foreground.
25 // Can be called from any window, even if the caller is not the 25 // Can be called from any window, even if the caller is not the
26 // foreground window. 26 // foreground window.
27 static HRESULT SetForeground(HWND window) { 27 static HRESULT SetForeground(HWND window) {
28 DCHECK(::IsWindow(window)); 28 DCHECK(::IsWindow(window));
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 LPARAM lparam, 84 LPARAM lparam,
85 BOOL& handled) { 85 BOOL& handled) {
86 HWND window = reinterpret_cast<HWND>(GetWindowLongPtr(hwnd(), 86 HWND window = reinterpret_cast<HWND>(GetWindowLongPtr(hwnd(),
87 GWLP_USERDATA)); 87 GWLP_USERDATA));
88 SetForegroundWindow(window); 88 SetForegroundWindow(window);
89 return 1; 89 return 1;
90 } 90 }
91 }; 91 };
92 92
93 #endif // WEBKIT_TOOLS_TEST_SHELL_FOREGROUND_HELPER_H_ 93 #endif // WEBKIT_TOOLS_TEST_SHELL_FOREGROUND_HELPER_H_
OLDNEW
« no previous file with comments | « webkit/glue/webplugin_page_delegate.h ('k') | webkit/tools/test_shell/test_shell.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698