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

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

Issue 392007: gtk: Hide the status bubble when the mouse nears it. (Closed)
Patch Set: merge again Created 11 years, 1 month 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/cocoa/status_bubble_mac.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/gfx/point.h"
10 #include "base/keyboard_codes.h" 11 #include "base/keyboard_codes.h"
11 #include "base/logging.h" 12 #include "base/logging.h"
12 #include "base/string_util.h" 13 #include "base/string_util.h"
13 #include "base/thread.h" 14 #include "base/thread.h"
14 #include "chrome/app/chrome_dll_resource.h" 15 #include "chrome/app/chrome_dll_resource.h"
15 #include "chrome/browser/bookmarks/bookmark_model.h" 16 #include "chrome/browser/bookmarks/bookmark_model.h"
16 #include "chrome/browser/bookmarks/bookmark_utils.h" 17 #include "chrome/browser/bookmarks/bookmark_utils.h"
17 #include "chrome/browser/browser_list.h" 18 #include "chrome/browser/browser_list.h"
18 #include "chrome/browser/browser_process.h" 19 #include "chrome/browser/browser_process.h"
19 #include "chrome/browser/browser_shutdown.h" 20 #include "chrome/browser/browser_shutdown.h"
(...skipping 1993 matching lines...) Expand 10 before | Expand all | Expand 10 after
2013 2014
2014 void Browser::ExtensionShelfSizeChanged() { 2015 void Browser::ExtensionShelfSizeChanged() {
2015 window_->SelectedTabExtensionShelfSizeChanged(); 2016 window_->SelectedTabExtensionShelfSizeChanged();
2016 } 2017 }
2017 2018
2018 void Browser::URLStarredChanged(TabContents* source, bool starred) { 2019 void Browser::URLStarredChanged(TabContents* source, bool starred) {
2019 if (source == GetSelectedTabContents()) 2020 if (source == GetSelectedTabContents())
2020 window_->SetStarredState(starred); 2021 window_->SetStarredState(starred);
2021 } 2022 }
2022 2023
2023 void Browser::ContentsMouseEvent(TabContents* source, bool motion) { 2024 void Browser::ContentsMouseEvent(
2025 TabContents* source, const gfx::Point& location, bool motion) {
2024 if (!GetStatusBubble()) 2026 if (!GetStatusBubble())
2025 return; 2027 return;
2026 2028
2027 if (source == GetSelectedTabContents()) { 2029 if (source == GetSelectedTabContents()) {
2028 if (motion) { 2030 GetStatusBubble()->MouseMoved(location, !motion);
2029 GetStatusBubble()->MouseMoved(); 2031 if (!motion)
2030 } else {
2031 GetStatusBubble()->SetURL(GURL(), std::wstring()); 2032 GetStatusBubble()->SetURL(GURL(), std::wstring());
2032 }
2033 } 2033 }
2034 } 2034 }
2035 2035
2036 void Browser::UpdateTargetURL(TabContents* source, const GURL& url) { 2036 void Browser::UpdateTargetURL(TabContents* source, const GURL& url) {
2037 if (!GetStatusBubble()) 2037 if (!GetStatusBubble())
2038 return; 2038 return;
2039 2039
2040 if (source == GetSelectedTabContents()) { 2040 if (source == GetSelectedTabContents()) {
2041 PrefService* prefs = profile_->GetPrefs(); 2041 PrefService* prefs = profile_->GetPrefs();
2042 GetStatusBubble()->SetURL(url, prefs->GetString(prefs::kAcceptLanguages)); 2042 GetStatusBubble()->SetURL(url, prefs->GetString(prefs::kAcceptLanguages));
(...skipping 981 matching lines...) Expand 10 before | Expand all | Expand 10 after
3024 /////////////////////////////////////////////////////////////////////////////// 3024 ///////////////////////////////////////////////////////////////////////////////
3025 // BrowserToolbarModel (private): 3025 // BrowserToolbarModel (private):
3026 3026
3027 NavigationController* Browser::BrowserToolbarModel::GetNavigationController() { 3027 NavigationController* Browser::BrowserToolbarModel::GetNavigationController() {
3028 // This |current_tab| can be NULL during the initialization of the 3028 // This |current_tab| can be NULL during the initialization of the
3029 // toolbar during window creation (i.e. before any tabs have been added 3029 // toolbar during window creation (i.e. before any tabs have been added
3030 // to the window). 3030 // to the window).
3031 TabContents* current_tab = browser_->GetSelectedTabContents(); 3031 TabContents* current_tab = browser_->GetSelectedTabContents();
3032 return current_tab ? &current_tab->controller() : NULL; 3032 return current_tab ? &current_tab->controller() : NULL;
3033 } 3033 }
OLDNEW
« no previous file with comments | « chrome/browser/browser.h ('k') | chrome/browser/cocoa/status_bubble_mac.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698