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

Side by Side Diff: chrome/browser/ui/gtk/browser_titlebar.h

Issue 9015022: Replace most of Browser::GetSelectedTabContents calls into Browser::GetSelectedWebContents. I've ... (Closed) Base URL: svn://chrome-svn/chrome/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
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 // A helper class that contains the gtk widgets that make up the titlebar. The 5 // A helper class that contains the gtk widgets that make up the titlebar. The
6 // titlebar consists of the tabstrip and if the custom chrome frame is turned 6 // titlebar consists of the tabstrip and if the custom chrome frame is turned
7 // on, it includes the taller titlebar and minimize, restore, maximize, and 7 // on, it includes the taller titlebar and minimize, restore, maximize, and
8 // close buttons. 8 // close buttons.
9 9
10 #ifndef CHROME_BROWSER_UI_GTK_BROWSER_TITLEBAR_H_ 10 #ifndef CHROME_BROWSER_UI_GTK_BROWSER_TITLEBAR_H_
(...skipping 12 matching lines...) Expand all
23 #include "ui/base/x/active_window_watcher_x_observer.h" 23 #include "ui/base/x/active_window_watcher_x_observer.h"
24 24
25 class AvatarMenuButtonGtk; 25 class AvatarMenuButtonGtk;
26 class BrowserWindowGtk; 26 class BrowserWindowGtk;
27 class CustomDrawButton; 27 class CustomDrawButton;
28 class GtkThemeService; 28 class GtkThemeService;
29 class MenuGtk; 29 class MenuGtk;
30 class PopupPageMenuModel; 30 class PopupPageMenuModel;
31 class TabContents; 31 class TabContents;
32 32
33 namespace content {
34 class WebContents;
35 }
36
33 class BrowserTitlebar : public content::NotificationObserver, 37 class BrowserTitlebar : public content::NotificationObserver,
34 public ui::ActiveWindowWatcherXObserver, 38 public ui::ActiveWindowWatcherXObserver,
35 public ui::SimpleMenuModel::Delegate { 39 public ui::SimpleMenuModel::Delegate {
36 public: 40 public:
37 // A default button order string for when we aren't asking gconf for the 41 // A default button order string for when we aren't asking gconf for the
38 // metacity configuration. 42 // metacity configuration.
39 static const char kDefaultButtonString[]; 43 static const char kDefaultButtonString[];
40 44
41 BrowserTitlebar(BrowserWindowGtk* browser_window, GtkWindow* window); 45 BrowserTitlebar(BrowserWindowGtk* browser_window, GtkWindow* window);
42 virtual ~BrowserTitlebar(); 46 virtual ~BrowserTitlebar();
(...skipping 12 matching lines...) Expand all
55 59
56 // Update the appearance of the title bar based on whether we're showing a 60 // Update the appearance of the title bar based on whether we're showing a
57 // custom frame or not. If |use_custom_frame| is true, we show an extra 61 // custom frame or not. If |use_custom_frame| is true, we show an extra
58 // tall titlebar and the min/max/close buttons. 62 // tall titlebar and the min/max/close buttons.
59 void UpdateCustomFrame(bool use_custom_frame); 63 void UpdateCustomFrame(bool use_custom_frame);
60 64
61 // Updates the title and icon when in app or popup mode (no tabstrip). 65 // Updates the title and icon when in app or popup mode (no tabstrip).
62 void UpdateTitleAndIcon(); 66 void UpdateTitleAndIcon();
63 67
64 // Called by the browser asking us to update the loading throbber. 68 // Called by the browser asking us to update the loading throbber.
65 // |tab_contents| is the tab that is associated with the window throbber. 69 // |web_contents| is the tab that is associated with the window throbber.
66 // |tab_contents| can be null. 70 // |web_contents| can be null.
67 void UpdateThrobber(TabContents* tab_contents); 71 void UpdateThrobber(content::WebContents* web_contents);
68 72
69 // On Windows, right clicking in the titlebar background brings up the system 73 // On Windows, right clicking in the titlebar background brings up the system
70 // menu. There's no such thing on linux, so we just show the menu items we 74 // menu. There's no such thing on linux, so we just show the menu items we
71 // add to the menu. 75 // add to the menu.
72 void ShowContextMenu(GdkEventButton* event); 76 void ShowContextMenu(GdkEventButton* event);
73 77
74 AvatarMenuButtonGtk* avatar_button() { return avatar_button_.get(); } 78 AvatarMenuButtonGtk* avatar_button() { return avatar_button_.get(); }
75 79
76 private: 80 private:
77 // A helper class to keep track of which frame of the throbber animation 81 // A helper class to keep track of which frame of the throbber animation
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
278 // The avatar button. 282 // The avatar button.
279 scoped_ptr<AvatarMenuButtonGtk> avatar_button_; 283 scoped_ptr<AvatarMenuButtonGtk> avatar_button_;
280 284
281 // Theme provider for building buttons. 285 // Theme provider for building buttons.
282 GtkThemeService* theme_service_; 286 GtkThemeService* theme_service_;
283 287
284 content::NotificationRegistrar registrar_; 288 content::NotificationRegistrar registrar_;
285 }; 289 };
286 290
287 #endif // CHROME_BROWSER_UI_GTK_BROWSER_TITLEBAR_H_ 291 #endif // CHROME_BROWSER_UI_GTK_BROWSER_TITLEBAR_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/gtk/bookmarks/bookmark_bar_gtk.cc ('k') | chrome/browser/ui/gtk/browser_titlebar.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698