| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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_ |
| OLD | NEW |