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

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

Issue 10337010: Revert r123782. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 7 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_
11 #define CHROME_BROWSER_UI_GTK_BROWSER_TITLEBAR_H_ 11 #define CHROME_BROWSER_UI_GTK_BROWSER_TITLEBAR_H_
12 #pragma once 12 #pragma once
13 13
14 #include <gtk/gtk.h> 14 #include <gtk/gtk.h>
15 15
16 #include "base/compiler_specific.h" 16 #include "base/compiler_specific.h"
17 #include "base/memory/scoped_ptr.h" 17 #include "base/memory/scoped_ptr.h"
18 #include "chrome/browser/prefs/pref_member.h" 18 #include "chrome/browser/prefs/pref_member.h"
19 #include "content/public/browser/notification_observer.h" 19 #include "content/public/browser/notification_observer.h"
20 #include "content/public/browser/notification_registrar.h" 20 #include "content/public/browser/notification_registrar.h"
21 #include "ui/base/gtk/gtk_signal.h" 21 #include "ui/base/gtk/gtk_signal.h"
22 #include "ui/base/models/simple_menu_model.h" 22 #include "ui/base/models/simple_menu_model.h"
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 ThemeServiceGtk; 28 class GtkThemeService;
29 class MenuGtk; 29 class MenuGtk;
30 class PopupPageMenuModel; 30 class PopupPageMenuModel;
31 31
32 namespace content { 32 namespace content {
33 class WebContents; 33 class WebContents;
34 } 34 }
35 35
36 class BrowserTitlebar : public content::NotificationObserver, 36 class BrowserTitlebar : public content::NotificationObserver,
37 public ui::ActiveWindowWatcherXObserver, 37 public ui::ActiveWindowWatcherXObserver,
38 public ui::SimpleMenuModel::Delegate { 38 public ui::SimpleMenuModel::Delegate {
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 // is allocated (though the user can (and do) manually mess with their gconf 120 // is allocated (though the user can (and do) manually mess with their gconf
121 // settings to get absolutely horrid combinations of buttons on both sides. 121 // settings to get absolutely horrid combinations of buttons on both sides.
122 GtkWidget* GetButtonHBox(bool left_side); 122 GtkWidget* GetButtonHBox(bool left_side);
123 123
124 CustomDrawButton* minimize_button() const { return minimize_button_.get(); } 124 CustomDrawButton* minimize_button() const { return minimize_button_.get(); }
125 CustomDrawButton* maximize_button() const { return maximize_button_.get(); } 125 CustomDrawButton* maximize_button() const { return maximize_button_.get(); }
126 CustomDrawButton* restore_button() const { return restore_button_.get(); } 126 CustomDrawButton* restore_button() const { return restore_button_.get(); }
127 CustomDrawButton* close_button() const { return close_button_.get(); } 127 CustomDrawButton* close_button() const { return close_button_.get(); }
128 GtkWidget* app_mode_title() const { return app_mode_title_; } 128 GtkWidget* app_mode_title() const { return app_mode_title_; }
129 129
130 ThemeServiceGtk* theme_service() const { return theme_service_; } 130 GtkThemeService* theme_service() const { return theme_service_; }
131 131
132 private: 132 private:
133 // A helper class to keep track of which frame of the throbber animation 133 // A helper class to keep track of which frame of the throbber animation
134 // we're showing. 134 // we're showing.
135 class Throbber { 135 class Throbber {
136 public: 136 public:
137 Throbber() : current_frame_(0), current_waiting_frame_(0) {} 137 Throbber() : current_frame_(0), current_waiting_frame_(0) {}
138 138
139 // Get the next frame in the animation. The image is owned by the throbber 139 // Get the next frame in the animation. The image is owned by the throbber
140 // so the caller doesn't need to unref. |is_waiting| is true if we're 140 // so the caller doesn't need to unref. |is_waiting| is true if we're
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
286 scoped_ptr<MenuGtk> favicon_menu_; 286 scoped_ptr<MenuGtk> favicon_menu_;
287 scoped_ptr<PopupPageMenuModel> favicon_menu_model_; 287 scoped_ptr<PopupPageMenuModel> favicon_menu_model_;
288 288
289 // The throbber used when the window is in app mode or popup window mode. 289 // The throbber used when the window is in app mode or popup window mode.
290 Throbber throbber_; 290 Throbber throbber_;
291 291
292 // The avatar button. 292 // The avatar button.
293 scoped_ptr<AvatarMenuButtonGtk> avatar_button_; 293 scoped_ptr<AvatarMenuButtonGtk> avatar_button_;
294 294
295 // Theme provider for building buttons. 295 // Theme provider for building buttons.
296 ThemeServiceGtk* theme_service_; 296 GtkThemeService* theme_service_;
297 297
298 content::NotificationRegistrar registrar_; 298 content::NotificationRegistrar registrar_;
299 }; 299 };
300 300
301 #endif // CHROME_BROWSER_UI_GTK_BROWSER_TITLEBAR_H_ 301 #endif // CHROME_BROWSER_UI_GTK_BROWSER_TITLEBAR_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/gtk/browser_actions_toolbar_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