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 "ash/shell/content_client/shell_browser_main_parts.h" | 5 #include "ash/shell/content_client/shell_browser_main_parts.h" |
6 | 6 |
7 #include "ash/shell/shell_delegate_impl.h" | 7 #include "ash/shell/shell_delegate_impl.h" |
8 #include "ash/shell/window_watcher.h" | 8 #include "ash/shell/window_watcher.h" |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
78 } | 78 } |
79 #endif | 79 #endif |
80 | 80 |
81 void ShellBrowserMainParts::PostMainMessageLoopStart() { | 81 void ShellBrowserMainParts::PostMainMessageLoopStart() { |
82 #if defined(OS_CHROMEOS) | 82 #if defined(OS_CHROMEOS) |
83 chromeos::DBusThreadManager::Initialize(); | 83 chromeos::DBusThreadManager::Initialize(); |
84 #endif | 84 #endif |
85 } | 85 } |
86 | 86 |
87 void ShellBrowserMainParts::PreMainMessageLoopRun() { | 87 void ShellBrowserMainParts::PreMainMessageLoopRun() { |
88 browser_context_.reset(new content::ShellBrowserContext); | 88 browser_context_.reset(new content::ShellBrowserContext(false)); |
scottmg
2012/07/25 16:20:20
the "false" is kind of opaque, is it worth ShellBr
| |
89 | 89 |
90 // A ViewsDelegate is required. | 90 // A ViewsDelegate is required. |
91 if (!views::ViewsDelegate::views_delegate) | 91 if (!views::ViewsDelegate::views_delegate) |
92 views::ViewsDelegate::views_delegate = new ShellViewsDelegate; | 92 views::ViewsDelegate::views_delegate = new ShellViewsDelegate; |
93 | 93 |
94 ash::shell::ShellDelegateImpl* delegate = new ash::shell::ShellDelegateImpl; | 94 ash::shell::ShellDelegateImpl* delegate = new ash::shell::ShellDelegateImpl; |
95 ash::Shell::CreateInstance(delegate); | 95 ash::Shell::CreateInstance(delegate); |
96 ash::Shell::GetInstance()->set_browser_context(browser_context_.get()); | 96 ash::Shell::GetInstance()->set_browser_context(browser_context_.get()); |
97 | 97 |
98 window_watcher_.reset(new ash::shell::WindowWatcher); | 98 window_watcher_.reset(new ash::shell::WindowWatcher); |
(...skipping 12 matching lines...) Expand all Loading... | |
111 aura::Env::DeleteInstance(); | 111 aura::Env::DeleteInstance(); |
112 } | 112 } |
113 | 113 |
114 bool ShellBrowserMainParts::MainMessageLoopRun(int* result_code) { | 114 bool ShellBrowserMainParts::MainMessageLoopRun(int* result_code) { |
115 MessageLoopForUI::current()->Run(); | 115 MessageLoopForUI::current()->Run(); |
116 return true; | 116 return true; |
117 } | 117 } |
118 | 118 |
119 } // namespace shell | 119 } // namespace shell |
120 } // namespace ash | 120 } // namespace ash |
OLD | NEW |