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

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

Issue 10443091: Make BrowserMainParts have an empty implementation to make embedding easier. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 6 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
« no previous file with comments | « ui/views/examples/content_client/examples_browser_main_parts.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/string_number_conversions.h" 10 #include "base/string_number_conversions.h"
(...skipping 28 matching lines...) Expand all
39 #if defined(USE_AURA) 39 #if defined(USE_AURA)
40 virtual views::NativeWidgetHelperAura* CreateNativeWidgetHelper( 40 virtual views::NativeWidgetHelperAura* CreateNativeWidgetHelper(
41 views::NativeWidgetAura* native_widget) OVERRIDE { 41 views::NativeWidgetAura* native_widget) OVERRIDE {
42 return new views::DesktopNativeWidgetHelperAura(native_widget); 42 return new views::DesktopNativeWidgetHelperAura(native_widget);
43 } 43 }
44 #endif 44 #endif
45 }; 45 };
46 } // namespace 46 } // namespace
47 47
48 ExamplesBrowserMainParts::ExamplesBrowserMainParts( 48 ExamplesBrowserMainParts::ExamplesBrowserMainParts(
49 const content::MainFunctionParams& parameters) 49 const content::MainFunctionParams& parameters) {
50 : BrowserMainParts() {
51 } 50 }
52 51
53 ExamplesBrowserMainParts::~ExamplesBrowserMainParts() { 52 ExamplesBrowserMainParts::~ExamplesBrowserMainParts() {
54 } 53 }
55 54
56 #if !defined(OS_MACOSX)
57 void ExamplesBrowserMainParts::PreMainMessageLoopStart() {
58 }
59 #endif
60
61 int ExamplesBrowserMainParts::PreCreateThreads() {
62 return 0;
63 }
64
65 void ExamplesBrowserMainParts::PreMainMessageLoopRun() { 55 void ExamplesBrowserMainParts::PreMainMessageLoopRun() {
66 browser_context_.reset(new content::ShellBrowserContext); 56 browser_context_.reset(new content::ShellBrowserContext);
67 57
68 #if defined(USE_AURA) 58 #if defined(USE_AURA)
69 aura::Env::GetInstance()->SetMonitorManager(new aura::SingleMonitorManager); 59 aura::Env::GetInstance()->SetMonitorManager(new aura::SingleMonitorManager);
70 stacking_client_.reset(new aura::DesktopStackingClient); 60 stacking_client_.reset(new aura::DesktopStackingClient);
71 gfx::Screen::SetInstance(aura::CreateDesktopScreen()); 61 gfx::Screen::SetInstance(aura::CreateDesktopScreen());
72 #endif 62 #endif
73 views_delegate_.reset(new ExamplesViewsDelegate); 63 views_delegate_.reset(new ExamplesViewsDelegate);
74 64
(...skipping 16 matching lines...) Expand all
91 views::AcceleratorHandler accelerator_handler; 81 views::AcceleratorHandler accelerator_handler;
92 MessageLoopForUI::current()->RunWithDispatcher(&accelerator_handler); 82 MessageLoopForUI::current()->RunWithDispatcher(&accelerator_handler);
93 #else 83 #else
94 MessageLoopForUI::current()->Run(); 84 MessageLoopForUI::current()->Run();
95 #endif 85 #endif
96 return true; 86 return true;
97 } 87 }
98 88
99 } // namespace examples 89 } // namespace examples
100 } // namespace views 90 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/examples/content_client/examples_browser_main_parts.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698