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

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

Issue 9535025: Remove the singleton instance get/delete methods from RootWindow (yay) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 9 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 #if defined(OS_WIN) 7 #if defined(OS_WIN)
8 #include <windows.h> 8 #include <windows.h>
9 #endif 9 #endif
10 10
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after
271 } // namespace 271 } // namespace
272 272
273 void RunMessageLoop() { 273 void RunMessageLoop() {
274 MessageLoop* loop = MessageLoop::current(); 274 MessageLoop* loop = MessageLoop::current();
275 MessageLoopForUI* ui_loop = 275 MessageLoopForUI* ui_loop =
276 content::BrowserThread::CurrentlyOn(content::BrowserThread::UI) ? 276 content::BrowserThread::CurrentlyOn(content::BrowserThread::UI) ?
277 MessageLoopForUI::current() : NULL; 277 MessageLoopForUI::current() : NULL;
278 MessageLoop::ScopedNestableTaskAllower allow(loop); 278 MessageLoop::ScopedNestableTaskAllower allow(loop);
279 if (ui_loop) { 279 if (ui_loop) {
280 #if defined(USE_AURA) 280 #if defined(USE_AURA)
281 ash::Shell::GetRootWindow()->ShowRootWindow();
282 ui_loop->Run(); 281 ui_loop->Run();
283 #elif defined(TOOLKIT_VIEWS) 282 #elif defined(TOOLKIT_VIEWS)
284 views::AcceleratorHandler handler; 283 views::AcceleratorHandler handler;
285 ui_loop->RunWithDispatcher(&handler); 284 ui_loop->RunWithDispatcher(&handler);
286 #elif defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID) 285 #elif defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID)
287 ui_loop->RunWithDispatcher(NULL); 286 ui_loop->RunWithDispatcher(NULL);
288 #else 287 #else
289 ui_loop->Run(); 288 ui_loop->Run();
290 #endif 289 #endif
291 } else { 290 } else {
(...skipping 839 matching lines...) Expand 10 before | Expand all | Expand 10 after
1131 return taker.TakeRenderWidgetSnapshot(rwh, page_size, page_size, bitmap); 1130 return taker.TakeRenderWidgetSnapshot(rwh, page_size, page_size, bitmap);
1132 } 1131 }
1133 1132
1134 bool TakeEntirePageSnapshot(RenderViewHost* rvh, SkBitmap* bitmap) { 1133 bool TakeEntirePageSnapshot(RenderViewHost* rvh, SkBitmap* bitmap) {
1135 DCHECK(bitmap); 1134 DCHECK(bitmap);
1136 SnapshotTaker taker; 1135 SnapshotTaker taker;
1137 return taker.TakeEntirePageSnapshot(rvh, bitmap); 1136 return taker.TakeEntirePageSnapshot(rvh, bitmap);
1138 } 1137 }
1139 1138
1140 } // namespace ui_test_utils 1139 } // namespace ui_test_utils
OLDNEW
« no previous file with comments | « chrome/test/base/chrome_render_view_host_test_harness.cc ('k') | chrome/test/base/view_event_test_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698