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

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

Issue 155706: Fix the URL status bubble overlapping the Mac download shelf (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 5 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 | « no previous file | chrome/browser/cocoa/browser_window_controller.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 1857 matching lines...) Expand 10 before | Expand all | Expand 10 after
1868 if (!GetStatusBubble()) 1868 if (!GetStatusBubble())
1869 return; 1869 return;
1870 1870
1871 if (source == GetSelectedTabContents()) { 1871 if (source == GetSelectedTabContents()) {
1872 PrefService* prefs = profile_->GetPrefs(); 1872 PrefService* prefs = profile_->GetPrefs();
1873 GetStatusBubble()->SetURL(url, prefs->GetString(prefs::kAcceptLanguages)); 1873 GetStatusBubble()->SetURL(url, prefs->GetString(prefs::kAcceptLanguages));
1874 } 1874 }
1875 } 1875 }
1876 1876
1877 void Browser::UpdateDownloadShelfVisibility(bool visible) { 1877 void Browser::UpdateDownloadShelfVisibility(bool visible) {
1878 GetStatusBubble()->UpdateDownloadShelfVisibility(visible); 1878 if (GetStatusBubble())
1879 GetStatusBubble()->UpdateDownloadShelfVisibility(visible);
1879 } 1880 }
1880 1881
1881 void Browser::ContentsZoomChange(bool zoom_in) { 1882 void Browser::ContentsZoomChange(bool zoom_in) {
1882 ExecuteCommand(zoom_in ? IDC_ZOOM_PLUS : IDC_ZOOM_MINUS); 1883 ExecuteCommand(zoom_in ? IDC_ZOOM_PLUS : IDC_ZOOM_MINUS);
1883 } 1884 }
1884 1885
1885 void Browser::TabContentsFocused(TabContents* tab_content) { 1886 void Browser::TabContentsFocused(TabContents* tab_content) {
1886 window_->TabContentsFocused(tab_content); 1887 window_->TabContentsFocused(tab_content);
1887 } 1888 }
1888 1889
(...skipping 514 matching lines...) Expand 10 before | Expand all | Expand 10 after
2403 ++cur_update; 2404 ++cur_update;
2404 } 2405 }
2405 } 2406 }
2406 } 2407 }
2407 2408
2408 2409
2409 /////////////////////////////////////////////////////////////////////////////// 2410 ///////////////////////////////////////////////////////////////////////////////
2410 // Browser, Getters for UI (private): 2411 // Browser, Getters for UI (private):
2411 2412
2412 StatusBubble* Browser::GetStatusBubble() { 2413 StatusBubble* Browser::GetStatusBubble() {
2413 return window_->GetStatusBubble(); 2414 return window_ ? window_->GetStatusBubble() : NULL;
2414 } 2415 }
2415 2416
2416 /////////////////////////////////////////////////////////////////////////////// 2417 ///////////////////////////////////////////////////////////////////////////////
2417 // Browser, Session restore functions (private): 2418 // Browser, Session restore functions (private):
2418 2419
2419 void Browser::SyncHistoryWithTabs(int index) { 2420 void Browser::SyncHistoryWithTabs(int index) {
2420 if (!profile()->HasSessionService()) 2421 if (!profile()->HasSessionService())
2421 return; 2422 return;
2422 SessionService* session_service = profile()->GetSessionService(); 2423 SessionService* session_service = profile()->GetSessionService();
2423 if (session_service) { 2424 if (session_service) {
(...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after
2773 /////////////////////////////////////////////////////////////////////////////// 2774 ///////////////////////////////////////////////////////////////////////////////
2774 // BrowserToolbarModel (private): 2775 // BrowserToolbarModel (private):
2775 2776
2776 NavigationController* Browser::BrowserToolbarModel::GetNavigationController() { 2777 NavigationController* Browser::BrowserToolbarModel::GetNavigationController() {
2777 // This |current_tab| can be NULL during the initialization of the 2778 // This |current_tab| can be NULL during the initialization of the
2778 // toolbar during window creation (i.e. before any tabs have been added 2779 // toolbar during window creation (i.e. before any tabs have been added
2779 // to the window). 2780 // to the window).
2780 TabContents* current_tab = browser_->GetSelectedTabContents(); 2781 TabContents* current_tab = browser_->GetSelectedTabContents();
2781 return current_tab ? &current_tab->controller() : NULL; 2782 return current_tab ? &current_tab->controller() : NULL;
2782 } 2783 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/cocoa/browser_window_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698