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

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

Issue 8356028: Add shortcut to show avatar menu (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix build error Created 9 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 | 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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 // Called by the browser asking us to update the loading throbber. 60 // Called by the browser asking us to update the loading throbber.
61 // |tab_contents| is the tab that is associated with the window throbber. 61 // |tab_contents| is the tab that is associated with the window throbber.
62 // |tab_contents| can be null. 62 // |tab_contents| can be null.
63 void UpdateThrobber(TabContents* tab_contents); 63 void UpdateThrobber(TabContents* tab_contents);
64 64
65 // On Windows, right clicking in the titlebar background brings up the system 65 // On Windows, right clicking in the titlebar background brings up the system
66 // menu. There's no such thing on linux, so we just show the menu items we 66 // menu. There's no such thing on linux, so we just show the menu items we
67 // add to the menu. 67 // add to the menu.
68 void ShowContextMenu(GdkEventButton* event); 68 void ShowContextMenu(GdkEventButton* event);
69 69
70 AvatarMenuButtonGtk* avatar_button() { return avatar_button_.get(); }
71
70 private: 72 private:
71 // A helper class to keep track of which frame of the throbber animation 73 // A helper class to keep track of which frame of the throbber animation
72 // we're showing. 74 // we're showing.
73 class Throbber { 75 class Throbber {
74 public: 76 public:
75 Throbber() : current_frame_(0), current_waiting_frame_(0) {} 77 Throbber() : current_frame_(0), current_waiting_frame_(0) {}
76 78
77 // Get the next frame in the animation. The image is owned by the throbber 79 // Get the next frame in the animation. The image is owned by the throbber
78 // so the caller doesn't need to unref. |is_waiting| is true if we're 80 // so the caller doesn't need to unref. |is_waiting| is true if we're
79 // still waiting for a response. 81 // still waiting for a response.
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
271 // The avatar button. 273 // The avatar button.
272 scoped_ptr<AvatarMenuButtonGtk> avatar_button_; 274 scoped_ptr<AvatarMenuButtonGtk> avatar_button_;
273 275
274 // Theme provider for building buttons. 276 // Theme provider for building buttons.
275 GtkThemeService* theme_service_; 277 GtkThemeService* theme_service_;
276 278
277 content::NotificationRegistrar registrar_; 279 content::NotificationRegistrar registrar_;
278 }; 280 };
279 281
280 #endif // CHROME_BROWSER_UI_GTK_BROWSER_TITLEBAR_H_ 282 #endif // CHROME_BROWSER_UI_GTK_BROWSER_TITLEBAR_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/gtk/avatar_menu_button_gtk.cc ('k') | chrome/browser/ui/gtk/browser_window_gtk.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698