Chromium Code Reviews

Side by Side Diff: chrome/browser/browser.cc

Issue 159763: Rolling back change 22245. (Closed) Base URL: svn://chrome-svn.corp.google.com/chrome/trunk/src/
Patch Set: Created 11 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff |
« no previous file with comments | « chrome/browser/browser.h ('k') | chrome/browser/extensions/extension_function_dispatcher.h » ('j') | 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) 2006-2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2009 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/browser.h" 5 #include "chrome/browser/browser.h"
6 6
7 #include "app/animation.h" 7 #include "app/animation.h"
8 #include "app/l10n_util.h" 8 #include "app/l10n_util.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/idle_timer.h" 10 #include "base/idle_timer.h"
(...skipping 254 matching lines...)
265 Browser* Browser::CreateForApp(const std::wstring& app_name, 265 Browser* Browser::CreateForApp(const std::wstring& app_name,
266 Profile* profile, bool is_popup) { 266 Profile* profile, bool is_popup) {
267 Browser* browser = new Browser(is_popup? TYPE_APP_POPUP : TYPE_APP, profile); 267 Browser* browser = new Browser(is_popup? TYPE_APP_POPUP : TYPE_APP, profile);
268 browser->app_name_ = app_name; 268 browser->app_name_ = app_name;
269 browser->CreateBrowserWindow(); 269 browser->CreateBrowserWindow();
270 return browser; 270 return browser;
271 } 271 }
272 272
273 void Browser::CreateBrowserWindow() { 273 void Browser::CreateBrowserWindow() {
274 DCHECK(!window_); 274 DCHECK(!window_);
275
276 if (SupportsWindowFeature(FEATURE_EXTENSIONSHELF))
277 extension_shelf_model_.reset(new ExtensionShelfModel(this));
278
279 window_ = BrowserWindow::CreateBrowserWindow(this); 275 window_ = BrowserWindow::CreateBrowserWindow(this);
280 276
281 // Show the First Run information bubble if we've been told to. 277 // Show the First Run information bubble if we've been told to.
282 PrefService* local_state = g_browser_process->local_state(); 278 PrefService* local_state = g_browser_process->local_state();
283 if (!local_state) 279 if (!local_state)
284 return; 280 return;
285 if (local_state->IsPrefRegistered(prefs::kShouldShowFirstRunBubble) && 281 if (local_state->IsPrefRegistered(prefs::kShouldShowFirstRunBubble) &&
286 local_state->GetBoolean(prefs::kShouldShowFirstRunBubble)) { 282 local_state->GetBoolean(prefs::kShouldShowFirstRunBubble)) {
287 bool show_OEM_bubble = (local_state-> 283 bool show_OEM_bubble = (local_state->
288 IsPrefRegistered(prefs::kShouldUseOEMFirstRunBubble) && 284 IsPrefRegistered(prefs::kShouldUseOEMFirstRunBubble) &&
(...skipping 2506 matching lines...)
2795 /////////////////////////////////////////////////////////////////////////////// 2791 ///////////////////////////////////////////////////////////////////////////////
2796 // BrowserToolbarModel (private): 2792 // BrowserToolbarModel (private):
2797 2793
2798 NavigationController* Browser::BrowserToolbarModel::GetNavigationController() { 2794 NavigationController* Browser::BrowserToolbarModel::GetNavigationController() {
2799 // This |current_tab| can be NULL during the initialization of the 2795 // This |current_tab| can be NULL during the initialization of the
2800 // toolbar during window creation (i.e. before any tabs have been added 2796 // toolbar during window creation (i.e. before any tabs have been added
2801 // to the window). 2797 // to the window).
2802 TabContents* current_tab = browser_->GetSelectedTabContents(); 2798 TabContents* current_tab = browser_->GetSelectedTabContents();
2803 return current_tab ? &current_tab->controller() : NULL; 2799 return current_tab ? &current_tab->controller() : NULL;
2804 } 2800 }
OLDNEW
« no previous file with comments | « chrome/browser/browser.h ('k') | chrome/browser/extensions/extension_function_dispatcher.h » ('j') | no next file with comments »

Powered by Google App Engine