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

Side by Side Diff: ui/views/examples/content_client/examples_browser_main_parts.cc

Issue 11364053: make StackingClient dispatch to either ash or desktop (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: remove file Created 8 years, 1 month 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 "ui/views/examples/content_client/examples_browser_main_parts.h" 5 #include "ui/views/examples/content_client/examples_browser_main_parts.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "base/run_loop.h" 10 #include "base/run_loop.h"
(...skipping 25 matching lines...) Expand all
36 36
37 ExamplesBrowserMainParts::~ExamplesBrowserMainParts() { 37 ExamplesBrowserMainParts::~ExamplesBrowserMainParts() {
38 } 38 }
39 39
40 void ExamplesBrowserMainParts::PreMainMessageLoopRun() { 40 void ExamplesBrowserMainParts::PreMainMessageLoopRun() {
41 browser_context_.reset(new content::ShellBrowserContext(false)); 41 browser_context_.reset(new content::ShellBrowserContext(false));
42 42
43 #if defined(USE_AURA) 43 #if defined(USE_AURA)
44 aura::Env::GetInstance()->SetDisplayManager(new aura::SingleDisplayManager); 44 aura::Env::GetInstance()->SetDisplayManager(new aura::SingleDisplayManager);
45 stacking_client_.reset(new aura::DesktopStackingClient); 45 stacking_client_.reset(new aura::DesktopStackingClient);
46 aura::client::SetStackingClient(stacking_client_.get());
46 gfx::Screen::SetScreenInstance( 47 gfx::Screen::SetScreenInstance(
47 gfx::SCREEN_TYPE_NATIVE, aura::CreateDesktopScreen()); 48 gfx::SCREEN_TYPE_NATIVE, aura::CreateDesktopScreen());
48 #endif 49 #endif
49 views_delegate_.reset(new DesktopTestViewsDelegate); 50 views_delegate_.reset(new DesktopTestViewsDelegate);
50 51
51 ShowExamplesWindowWithContent(QUIT_ON_CLOSE, browser_context_.get()); 52 ShowExamplesWindowWithContent(QUIT_ON_CLOSE, browser_context_.get());
52 } 53 }
53 54
54 void ExamplesBrowserMainParts::PostMainMessageLoopRun() { 55 void ExamplesBrowserMainParts::PostMainMessageLoopRun() {
55 browser_context_.reset(); 56 browser_context_.reset();
(...skipping 11 matching lines...) Expand all
67 base::RunLoop run_loop(&accelerator_handler); 68 base::RunLoop run_loop(&accelerator_handler);
68 #else 69 #else
69 base::RunLoop run_loop; 70 base::RunLoop run_loop;
70 #endif 71 #endif
71 run_loop.Run(); 72 run_loop.Run();
72 return true; 73 return true;
73 } 74 }
74 75
75 } // namespace examples 76 } // namespace examples
76 } // namespace views 77 } // namespace views
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698