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

Side by Side Diff: chrome/browser/gtk/browser_window_gtk.h

Issue 42190: Linux accelerators cleanup (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 9 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) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 #ifndef CHROME_BROWSER_GTK_BROWSER_WINDOW_GTK_H_ 5 #ifndef CHROME_BROWSER_GTK_BROWSER_WINDOW_GTK_H_
6 #define CHROME_BROWSER_GTK_BROWSER_WINDOW_GTK_H_ 6 #define CHROME_BROWSER_GTK_BROWSER_WINDOW_GTK_H_
7 7
8 #include <gtk/gtk.h> 8 #include <gtk/gtk.h>
9 9
10 #include "base/gfx/rect.h" 10 #include "base/gfx/rect.h"
(...skipping 19 matching lines...) Expand all
30 virtual ~BrowserWindowGtk(); 30 virtual ~BrowserWindowGtk();
31 31
32 // Overridden from BrowserWindow 32 // Overridden from BrowserWindow
33 virtual void Init(); 33 virtual void Init();
34 virtual void Show(); 34 virtual void Show();
35 virtual void SetBounds(const gfx::Rect& bounds); 35 virtual void SetBounds(const gfx::Rect& bounds);
36 virtual void Close(); 36 virtual void Close();
37 virtual void Activate(); 37 virtual void Activate();
38 virtual bool IsActive() const; 38 virtual bool IsActive() const;
39 virtual void FlashFrame(); 39 virtual void FlashFrame();
40 virtual void* GetNativeHandle(); 40 virtual gfx::NativeWindow GetNativeHandle();
41 virtual BrowserWindowTesting* GetBrowserWindowTesting(); 41 virtual BrowserWindowTesting* GetBrowserWindowTesting();
42 virtual StatusBubble* GetStatusBubble(); 42 virtual StatusBubble* GetStatusBubble();
43 virtual void SelectedTabToolbarSizeChanged(bool is_animating); 43 virtual void SelectedTabToolbarSizeChanged(bool is_animating);
44 virtual void UpdateTitleBar(); 44 virtual void UpdateTitleBar();
45 virtual void UpdateLoadingAnimations(bool should_animate); 45 virtual void UpdateLoadingAnimations(bool should_animate);
46 virtual void SetStarredState(bool is_starred); 46 virtual void SetStarredState(bool is_starred);
47 virtual gfx::Rect GetNormalBounds() const; 47 virtual gfx::Rect GetNormalBounds() const;
48 virtual bool IsMaximized() const; 48 virtual bool IsMaximized() const;
49 virtual void SetFullscreen(bool fullscreen); 49 virtual void SetFullscreen(bool fullscreen);
50 virtual bool IsFullscreen() const; 50 virtual bool IsFullscreen() const;
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 void OnStateChanged(GdkWindowState state); 83 void OnStateChanged(GdkWindowState state);
84 84
85 protected: 85 protected:
86 virtual void DestroyBrowser(); 86 virtual void DestroyBrowser();
87 GtkWindow* window_; 87 GtkWindow* window_;
88 GtkWidget* vbox_; 88 GtkWidget* vbox_;
89 89
90 scoped_ptr<Browser> browser_; 90 scoped_ptr<Browser> browser_;
91 91
92 private: 92 private:
93 // Connect accelerators that aren't connected to menu items (like ctrl-o,
94 // ctrl-l, etc.).
95 void ConnectAccelerators();
96
93 // Change whether we're showing the custom blue frame. 97 // Change whether we're showing the custom blue frame.
94 // Must be called once at startup. 98 // Must be called once at startup.
95 // Triggers relayout of the content. 99 // Triggers relayout of the content.
96 void SetCustomFrame(bool custom_frame); 100 void SetCustomFrame(bool custom_frame);
97 101
98 // Callback for when the "content area" vbox needs to be redrawn. 102 // Callback for when the "content area" vbox needs to be redrawn.
99 // The content area includes the toolbar and web page but not the tab strip. 103 // The content area includes the toolbar and web page but not the tab strip.
100 // It has a soft gray border when we have a custom frame. 104 // It has a soft gray border when we have a custom frame.
101 static gboolean OnContentAreaExpose(GtkWidget* widget, GdkEventExpose* e, 105 static gboolean OnContentAreaExpose(GtkWidget* widget, GdkEventExpose* e,
102 BrowserWindowGtk* window); 106 BrowserWindowGtk* window);
103 107
104 static gboolean OnWindowDestroyed(GtkWidget* window, 108 static gboolean OnWindowDestroyed(GtkWidget* window,
105 BrowserWindowGtk* browser_win); 109 BrowserWindowGtk* browser_win);
110
111 static gboolean OnAccelerator(GtkAccelGroup* accel_group,
112 GObject* acceleratable,
113 guint keyval,
114 GdkModifierType modifier,
115 BrowserWindowGtk* browser_window);
116
106 gfx::Rect bounds_; 117 gfx::Rect bounds_;
107 GdkWindowState state_; 118 GdkWindowState state_;
108 119
109 // Theme graphics for the content area. 120 // Theme graphics for the content area.
110 scoped_ptr<NineBox> content_area_ninebox_; 121 scoped_ptr<NineBox> content_area_ninebox_;
111 122
112 // Whether we're drawing the custom Chrome frame (including title bar). 123 // Whether we're drawing the custom Chrome frame (including title bar).
113 bool custom_frame_; 124 bool custom_frame_;
114 125
115 // The object that manages all of the widgets in the toolbar. 126 // The object that manages all of the widgets in the toolbar.
116 scoped_ptr<BrowserToolbarGtk> toolbar_; 127 scoped_ptr<BrowserToolbarGtk> toolbar_;
117 128
118 // The status bubble manager. Always non-NULL. 129 // The status bubble manager. Always non-NULL.
119 scoped_ptr<StatusBubbleGtk> status_bubble_; 130 scoped_ptr<StatusBubbleGtk> status_bubble_;
120 131
121 // A container that manages the GtkWidget*s that are the webpage display 132 // A container that manages the GtkWidget*s that are the webpage display
122 // (along with associated infobars, shelves, and other things that are part 133 // (along with associated infobars, shelves, and other things that are part
123 // of the content area). 134 // of the content area).
124 scoped_ptr<TabContentsContainerGtk> contents_container_; 135 scoped_ptr<TabContentsContainerGtk> contents_container_;
125 136
126 // The Find Bar. This may be NULL if there is no Find Bar, and if it is 137 // The Find Bar. This may be NULL if there is no Find Bar, and if it is
127 // non-NULL, it may or may not be visible. It is possible for the Find Bar 138 // non-NULL, it may or may not be visible. It is possible for the Find Bar
128 // to move among windows as tabs are dragged around. 139 // to move among windows as tabs are dragged around.
129 scoped_ptr<FindBarController> find_bar_controller_; 140 scoped_ptr<FindBarController> find_bar_controller_;
130 }; 141 };
131 142
132 #endif // CHROME_BROWSER_GTK_BROWSER_WINDOW_GTK_H_ 143 #endif // CHROME_BROWSER_GTK_BROWSER_WINDOW_GTK_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698