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

Side by Side Diff: chrome/test/base/ui_test_utils_win.cc

Issue 10538039: Renamed BrowserWindow::GetNativeHandle() to GetNativeWindow() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Update copyrights Created 8 years, 6 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #include "chrome/test/base/ui_test_utils.h" 5 #include "chrome/test/base/ui_test_utils.h"
6 6
7 #include "base/file_path.h" 7 #include "base/file_path.h"
8 #include "base/file_util.h" 8 #include "base/file_util.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/message_loop.h" 10 #include "base/message_loop.h"
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 snapshot_file = trial_file; 47 snapshot_file = trial_file;
48 } 48 }
49 return snapshot_file; 49 return snapshot_file;
50 } 50 }
51 51
52 } // namespace 52 } // namespace
53 53
54 bool IsViewFocused(const Browser* browser, ViewID vid) { 54 bool IsViewFocused(const Browser* browser, ViewID vid) {
55 BrowserWindow* browser_window = browser->window(); 55 BrowserWindow* browser_window = browser->window();
56 DCHECK(browser_window); 56 DCHECK(browser_window);
57 gfx::NativeWindow window = browser_window->GetNativeHandle(); 57 gfx::NativeWindow window = browser_window->GetNativeWindow();
58 DCHECK(window); 58 DCHECK(window);
59 const views::Widget* widget = 59 const views::Widget* widget =
60 views::Widget::GetTopLevelWidgetForNativeView(window); 60 views::Widget::GetTopLevelWidgetForNativeView(window);
61 DCHECK(widget); 61 DCHECK(widget);
62 const views::FocusManager* focus_manager = widget->GetFocusManager(); 62 const views::FocusManager* focus_manager = widget->GetFocusManager();
63 DCHECK(focus_manager); 63 DCHECK(focus_manager);
64 return focus_manager->GetFocusedView()->id() == vid; 64 return focus_manager->GetFocusedView()->id() == vid;
65 } 65 }
66 66
67 void ClickOnView(const Browser* browser, ViewID vid) { 67 void ClickOnView(const Browser* browser, ViewID vid) {
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 } 142 }
143 143
144 bool SaveScreenSnapshotToDesktop(FilePath* screenshot_path) { 144 bool SaveScreenSnapshotToDesktop(FilePath* screenshot_path) {
145 FilePath desktop; 145 FilePath desktop;
146 146
147 return PathService::Get(chrome::DIR_USER_DESKTOP, &desktop) && 147 return PathService::Get(chrome::DIR_USER_DESKTOP, &desktop) &&
148 SaveScreenSnapshotToDirectory(desktop, screenshot_path); 148 SaveScreenSnapshotToDirectory(desktop, screenshot_path);
149 } 149 }
150 150
151 } // namespace ui_test_utils 151 } // namespace ui_test_utils
OLDNEW
« no previous file with comments | « chrome/test/base/ui_test_utils_mac.mm ('k') | chrome/test/data/webui/certificate_viewer_ui_test-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698