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

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

Issue 160276: mole expand/collapse API (Closed)
Patch Set: fixed a couple of crashers Created 11 years, 4 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
« 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...) Expand 10 before | Expand all | Expand 10 after
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
275 window_ = BrowserWindow::CreateBrowserWindow(this); 279 window_ = BrowserWindow::CreateBrowserWindow(this);
276 280
277 // Show the First Run information bubble if we've been told to. 281 // Show the First Run information bubble if we've been told to.
278 PrefService* local_state = g_browser_process->local_state(); 282 PrefService* local_state = g_browser_process->local_state();
279 if (!local_state) 283 if (!local_state)
280 return; 284 return;
281 if (local_state->IsPrefRegistered(prefs::kShouldShowFirstRunBubble) && 285 if (local_state->IsPrefRegistered(prefs::kShouldShowFirstRunBubble) &&
282 local_state->GetBoolean(prefs::kShouldShowFirstRunBubble)) { 286 local_state->GetBoolean(prefs::kShouldShowFirstRunBubble)) {
283 bool show_OEM_bubble = (local_state-> 287 bool show_OEM_bubble = (local_state->
284 IsPrefRegistered(prefs::kShouldUseOEMFirstRunBubble) && 288 IsPrefRegistered(prefs::kShouldUseOEMFirstRunBubble) &&
(...skipping 2506 matching lines...) Expand 10 before | Expand all | Expand 10 after
2791 /////////////////////////////////////////////////////////////////////////////// 2795 ///////////////////////////////////////////////////////////////////////////////
2792 // BrowserToolbarModel (private): 2796 // BrowserToolbarModel (private):
2793 2797
2794 NavigationController* Browser::BrowserToolbarModel::GetNavigationController() { 2798 NavigationController* Browser::BrowserToolbarModel::GetNavigationController() {
2795 // This |current_tab| can be NULL during the initialization of the 2799 // This |current_tab| can be NULL during the initialization of the
2796 // toolbar during window creation (i.e. before any tabs have been added 2800 // toolbar during window creation (i.e. before any tabs have been added
2797 // to the window). 2801 // to the window).
2798 TabContents* current_tab = browser_->GetSelectedTabContents(); 2802 TabContents* current_tab = browser_->GetSelectedTabContents();
2799 return current_tab ? &current_tab->controller() : NULL; 2803 return current_tab ? &current_tab->controller() : NULL;
2800 } 2804 }
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
This is Rietveld 408576698