| OLD | NEW |
| 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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 } // namespace | 44 } // namespace |
| 45 | 45 |
| 46 ExamplesBrowserMainParts::ExamplesBrowserMainParts( | 46 ExamplesBrowserMainParts::ExamplesBrowserMainParts( |
| 47 const content::MainFunctionParams& parameters) { | 47 const content::MainFunctionParams& parameters) { |
| 48 } | 48 } |
| 49 | 49 |
| 50 ExamplesBrowserMainParts::~ExamplesBrowserMainParts() { | 50 ExamplesBrowserMainParts::~ExamplesBrowserMainParts() { |
| 51 } | 51 } |
| 52 | 52 |
| 53 void ExamplesBrowserMainParts::PreMainMessageLoopRun() { | 53 void ExamplesBrowserMainParts::PreMainMessageLoopRun() { |
| 54 browser_context_.reset(new content::ShellBrowserContext); | 54 browser_context_.reset(new content::ShellBrowserContext(false)); |
| 55 | 55 |
| 56 #if defined(USE_AURA) | 56 #if defined(USE_AURA) |
| 57 aura::Env::GetInstance()->SetDisplayManager(new aura::SingleDisplayManager); | 57 aura::Env::GetInstance()->SetDisplayManager(new aura::SingleDisplayManager); |
| 58 stacking_client_.reset(new aura::DesktopStackingClient); | 58 stacking_client_.reset(new aura::DesktopStackingClient); |
| 59 gfx::Screen::SetInstance(aura::CreateDesktopScreen()); | 59 gfx::Screen::SetInstance(aura::CreateDesktopScreen()); |
| 60 #endif | 60 #endif |
| 61 views_delegate_.reset(new ExamplesViewsDelegate); | 61 views_delegate_.reset(new ExamplesViewsDelegate); |
| 62 | 62 |
| 63 views::examples::ShowExamplesWindow(views::examples::QUIT_ON_CLOSE, | 63 views::examples::ShowExamplesWindow(views::examples::QUIT_ON_CLOSE, |
| 64 browser_context_.get()); | 64 browser_context_.get()); |
| (...skipping 15 matching lines...) Expand all Loading... |
| 80 base::RunLoop run_loop(&accelerator_handler); | 80 base::RunLoop run_loop(&accelerator_handler); |
| 81 #else | 81 #else |
| 82 base::RunLoop run_loop; | 82 base::RunLoop run_loop; |
| 83 #endif | 83 #endif |
| 84 run_loop.Run(); | 84 run_loop.Run(); |
| 85 return true; | 85 return true; |
| 86 } | 86 } |
| 87 | 87 |
| 88 } // namespace examples | 88 } // namespace examples |
| 89 } // namespace views | 89 } // namespace views |
| OLD | NEW |