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