| 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/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
| 10 #include "base/run_loop.h" | 10 #include "base/run_loop.h" |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 #if defined(OS_CHROMEOS) | 48 #if defined(OS_CHROMEOS) |
| 49 gfx::Screen::SetScreenInstance( | 49 gfx::Screen::SetScreenInstance( |
| 50 gfx::SCREEN_TYPE_NATIVE, aura::TestScreen::Create()); | 50 gfx::SCREEN_TYPE_NATIVE, aura::TestScreen::Create()); |
| 51 // Set up basic pieces of views::corewm. | 51 // Set up basic pieces of views::corewm. |
| 52 minimal_shell_.reset(new shell::MinimalShell(gfx::Size(800, 600))); | 52 minimal_shell_.reset(new shell::MinimalShell(gfx::Size(800, 600))); |
| 53 // Ensure the X window gets mapped. | 53 // Ensure the X window gets mapped. |
| 54 minimal_shell_->root_window()->ShowRootWindow(); | 54 minimal_shell_->root_window()->ShowRootWindow(); |
| 55 // Ensure Aura knows where to open new windows. | 55 // Ensure Aura knows where to open new windows. |
| 56 window_context = minimal_shell_->root_window(); | 56 window_context = minimal_shell_->root_window(); |
| 57 #elif defined(USE_AURA) | 57 #elif defined(USE_AURA) |
| 58 aura::Env::CreateInstance(); |
| 58 gfx::Screen::SetScreenInstance( | 59 gfx::Screen::SetScreenInstance( |
| 59 gfx::SCREEN_TYPE_NATIVE, CreateDesktopScreen()); | 60 gfx::SCREEN_TYPE_NATIVE, CreateDesktopScreen()); |
| 60 #endif | 61 #endif |
| 61 views_delegate_.reset(new DesktopTestViewsDelegate); | 62 views_delegate_.reset(new DesktopTestViewsDelegate); |
| 62 | 63 |
| 63 ShowExamplesWindowWithContent( | 64 ShowExamplesWindowWithContent( |
| 64 QUIT_ON_CLOSE, browser_context_.get(), window_context); | 65 QUIT_ON_CLOSE, browser_context_.get(), window_context); |
| 65 } | 66 } |
| 66 | 67 |
| 67 void ExamplesBrowserMainParts::PostMainMessageLoopRun() { | 68 void ExamplesBrowserMainParts::PostMainMessageLoopRun() { |
| (...skipping 14 matching lines...) Expand all Loading... |
| 82 base::RunLoop run_loop(&accelerator_handler); | 83 base::RunLoop run_loop(&accelerator_handler); |
| 83 #else | 84 #else |
| 84 base::RunLoop run_loop; | 85 base::RunLoop run_loop; |
| 85 #endif | 86 #endif |
| 86 run_loop.Run(); | 87 run_loop.Run(); |
| 87 return true; | 88 return true; |
| 88 } | 89 } |
| 89 | 90 |
| 90 } // namespace examples | 91 } // namespace examples |
| 91 } // namespace views | 92 } // namespace views |
| OLD | NEW |