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 "chrome/browser/ui/extensions/application_launch.h" | 5 #include "chrome/browser/ui/extensions/application_launch.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/metrics/histogram.h" | 8 #include "base/metrics/histogram.h" |
9 #include "chrome/browser/extensions/extension_prefs.h" | 9 #include "chrome/browser/extensions/extension_prefs.h" |
10 #include "chrome/browser/extensions/extension_service.h" | 10 #include "chrome/browser/extensions/extension_service.h" |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 params.initial_show_state = ui::SHOW_STATE_NORMAL; | 108 params.initial_show_state = ui::SHOW_STATE_NORMAL; |
109 } | 109 } |
110 #endif | 110 #endif |
111 | 111 |
112 Browser* browser = NULL; | 112 Browser* browser = NULL; |
113 #if defined(OS_WIN) | 113 #if defined(OS_WIN) |
114 // On Windows 8's single window Metro mode we don't allow multiple Chrome | 114 // On Windows 8's single window Metro mode we don't allow multiple Chrome |
115 // windows to be created. We instead attempt to reuse an existing Browser | 115 // windows to be created. We instead attempt to reuse an existing Browser |
116 // window. | 116 // window. |
117 if (win8::IsSingleWindowMetroMode()) { | 117 if (win8::IsSingleWindowMetroMode()) { |
118 browser = browser::FindBrowserWithProfile( | 118 browser = chrome::FindBrowserWithProfile( |
119 profile, chrome::HOST_DESKTOP_TYPE_NATIVE); | 119 profile, chrome::HOST_DESKTOP_TYPE_NATIVE); |
120 } | 120 } |
121 #endif | 121 #endif |
122 if (!browser) | 122 if (!browser) |
123 browser = new Browser(params); | 123 browser = new Browser(params); |
124 | 124 |
125 if (app_browser) | 125 if (app_browser) |
126 *app_browser = browser; | 126 *app_browser = browser; |
127 | 127 |
128 WebContents* web_contents = chrome::AddSelectedTabWithURL( | 128 WebContents* web_contents = chrome::AddSelectedTabWithURL( |
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
300 // OnDidGetApplicationInfo, which calls | 300 // OnDidGetApplicationInfo, which calls |
301 // web_app::UpdateShortcutForTabContents when it sees UPDATE_SHORTCUT as | 301 // web_app::UpdateShortcutForTabContents when it sees UPDATE_SHORTCUT as |
302 // pending web app action. | 302 // pending web app action. |
303 extensions::TabHelper::FromWebContents(tab)->set_pending_web_app_action( | 303 extensions::TabHelper::FromWebContents(tab)->set_pending_web_app_action( |
304 extensions::TabHelper::UPDATE_SHORTCUT); | 304 extensions::TabHelper::UPDATE_SHORTCUT); |
305 | 305 |
306 return tab; | 306 return tab; |
307 } | 307 } |
308 | 308 |
309 } // namespace application_launch | 309 } // namespace application_launch |
OLD | NEW |