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

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

Issue 9006027: Rip Out the Sidebar API (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 8 years, 11 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 | « chrome/browser/ui/browser.h ('k') | chrome/browser/ui/browser_window.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) 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/browser.h" 5 #include "chrome/browser/ui/browser.h"
6 6
7 #if defined(OS_WIN) 7 #if defined(OS_WIN)
8 #include <windows.h> 8 #include <windows.h>
9 #include <shellapi.h> 9 #include <shellapi.h>
10 #endif // OS_WIN 10 #endif // OS_WIN
(...skipping 1449 matching lines...) Expand 10 before | Expand all | Expand 10 after
1460 bool Browser::SupportsWindowFeatureImpl(WindowFeature feature, 1460 bool Browser::SupportsWindowFeatureImpl(WindowFeature feature,
1461 bool check_fullscreen) const { 1461 bool check_fullscreen) const {
1462 // On Mac, fullscreen mode has most normal things (in a slide-down panel). On 1462 // On Mac, fullscreen mode has most normal things (in a slide-down panel). On
1463 // other platforms, we hide some controls when in fullscreen mode. 1463 // other platforms, we hide some controls when in fullscreen mode.
1464 bool hide_ui_for_fullscreen = false; 1464 bool hide_ui_for_fullscreen = false;
1465 #if !defined(OS_MACOSX) 1465 #if !defined(OS_MACOSX)
1466 hide_ui_for_fullscreen = check_fullscreen && window_ && 1466 hide_ui_for_fullscreen = check_fullscreen && window_ &&
1467 window_->IsFullscreen(); 1467 window_->IsFullscreen();
1468 #endif 1468 #endif
1469 1469
1470 unsigned int features = FEATURE_INFOBAR | FEATURE_SIDEBAR; 1470 unsigned int features = FEATURE_INFOBAR;
1471 1471
1472 #if !defined(OS_CHROMEOS) || defined(USE_AURA) 1472 #if !defined(OS_CHROMEOS) || defined(USE_AURA)
1473 // Chrome OS opens a FileBrowse pop up instead of using download shelf. 1473 // Chrome OS opens a FileBrowse pop up instead of using download shelf.
1474 // So FEATURE_DOWNLOADSHELF is only added for non-chromeos platforms. 1474 // So FEATURE_DOWNLOADSHELF is only added for non-chromeos platforms.
1475 features |= FEATURE_DOWNLOADSHELF; 1475 features |= FEATURE_DOWNLOADSHELF;
1476 #endif // !defined(OS_CHROMEOS) || defined(USE_AURA) 1476 #endif // !defined(OS_CHROMEOS) || defined(USE_AURA)
1477 1477
1478 if (is_type_tabbed()) 1478 if (is_type_tabbed())
1479 features |= FEATURE_BOOKMARKBAR; 1479 features |= FEATURE_BOOKMARKBAR;
1480 1480
(...skipping 866 matching lines...) Expand 10 before | Expand all | Expand 10 after
2347 prefs->FindPreference(prefs::kHomePageIsNewTabPage); 2347 prefs->FindPreference(prefs::kHomePageIsNewTabPage);
2348 if (home_page_is_new_tab_page_pref && 2348 if (home_page_is_new_tab_page_pref &&
2349 !home_page_is_new_tab_page_pref->IsManaged() && 2349 !home_page_is_new_tab_page_pref->IsManaged() &&
2350 !prefs->HasPrefPath(prefs::kHomePageIsNewTabPage)) 2350 !prefs->HasPrefPath(prefs::kHomePageIsNewTabPage))
2351 prefs->SetBoolean(prefs::kHomePageIsNewTabPage, false); 2351 prefs->SetBoolean(prefs::kHomePageIsNewTabPage, false);
2352 } 2352 }
2353 2353
2354 // static 2354 // static
2355 void Browser::RegisterPrefs(PrefService* prefs) { 2355 void Browser::RegisterPrefs(PrefService* prefs) {
2356 prefs->RegisterIntegerPref(prefs::kOptionsWindowLastTabIndex, 0); 2356 prefs->RegisterIntegerPref(prefs::kOptionsWindowLastTabIndex, 0);
2357 prefs->RegisterIntegerPref(prefs::kExtensionSidebarWidth, -1);
2358 prefs->RegisterBooleanPref(prefs::kAllowFileSelectionDialogs, true); 2357 prefs->RegisterBooleanPref(prefs::kAllowFileSelectionDialogs, true);
2359 prefs->RegisterBooleanPref(prefs::kShouldShowFirstRunBubble, false); 2358 prefs->RegisterBooleanPref(prefs::kShouldShowFirstRunBubble, false);
2360 } 2359 }
2361 2360
2362 // static 2361 // static
2363 void Browser::RegisterUserPrefs(PrefService* prefs) { 2362 void Browser::RegisterUserPrefs(PrefService* prefs) {
2364 prefs->RegisterStringPref(prefs::kHomePage, 2363 prefs->RegisterStringPref(prefs::kHomePage,
2365 chrome::kChromeUINewTabURL, 2364 chrome::kChromeUINewTabURL,
2366 PrefService::SYNCABLE_PREF); 2365 PrefService::SYNCABLE_PREF);
2367 prefs->RegisterBooleanPref(prefs::kHomePageChanged, 2366 prefs->RegisterBooleanPref(prefs::kHomePageChanged,
(...skipping 3038 matching lines...) Expand 10 before | Expand all | Expand 10 after
5406 window_->GetLocationBar()->ShowFirstRunBubble(bubble_type); 5405 window_->GetLocationBar()->ShowFirstRunBubble(bubble_type);
5407 } else { 5406 } else {
5408 GlobalErrorService* service = 5407 GlobalErrorService* service =
5409 GlobalErrorServiceFactory::GetForProfile(profile()); 5408 GlobalErrorServiceFactory::GetForProfile(profile());
5410 GlobalError* error = service->GetFirstGlobalErrorWithBubbleView(); 5409 GlobalError* error = service->GetFirstGlobalErrorWithBubbleView();
5411 if (error) { 5410 if (error) {
5412 error->ShowBubbleView(this); 5411 error->ShowBubbleView(this);
5413 } 5412 }
5414 } 5413 }
5415 } 5414 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/browser.h ('k') | chrome/browser/ui/browser_window.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698