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

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

Issue 155075: Popup changes (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 5 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
« no previous file with comments | « chrome/browser/browser.cc ('k') | chrome/browser/gtk/browser_window_gtk.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 <map> 10 #include <map>
11 11
12 #include "base/gfx/rect.h" 12 #include "base/gfx/rect.h"
13 #include "base/scoped_ptr.h" 13 #include "base/scoped_ptr.h"
14 #include "base/timer.h" 14 #include "base/timer.h"
15 #include "build/build_config.h"
15 #include "chrome/browser/browser_window.h" 16 #include "chrome/browser/browser_window.h"
16 #include "chrome/browser/tabs/tab_strip_model.h" 17 #include "chrome/browser/tabs/tab_strip_model.h"
17 #include "chrome/common/notification_registrar.h" 18 #include "chrome/common/notification_registrar.h"
18 #include "chrome/common/pref_member.h" 19 #include "chrome/common/pref_member.h"
19 #include "chrome/common/x11_util.h" 20 #include "chrome/common/x11_util.h"
20 21
21 class BookmarkBarGtk; 22 class BookmarkBarGtk;
22 class Browser; 23 class Browser;
23 class BrowserTitlebar; 24 class BrowserTitlebar;
24 class BrowserToolbarGtk; 25 class BrowserToolbarGtk;
25 class CustomDrawButton; 26 class CustomDrawButton;
26 class DownloadShelfGtk; 27 class DownloadShelfGtk;
27 class FindBarGtk; 28 class FindBarGtk;
28 class InfoBarContainerGtk; 29 class InfoBarContainerGtk;
29 class LocationBar; 30 class LocationBar;
30 class StatusBubbleGtk; 31 class StatusBubbleGtk;
31 class TabContentsContainerGtk; 32 class TabContentsContainerGtk;
32 class TabStripGtk; 33 class TabStripGtk;
33 34
35 #ifdef LINUX2
36 class PanelController;
37 #endif
38
34 // An implementation of BrowserWindow for GTK. 39 // An implementation of BrowserWindow for GTK.
35 // Cross-platform code will interact with this object when 40 // Cross-platform code will interact with this object when
36 // it needs to manipulate the window. 41 // it needs to manipulate the window.
37 42
38 class BrowserWindowGtk : public BrowserWindow, 43 class BrowserWindowGtk : public BrowserWindow,
39 public NotificationObserver, 44 public NotificationObserver,
40 public TabStripModelObserver { 45 public TabStripModelObserver {
41 public: 46 public:
42 explicit BrowserWindowGtk(Browser* browser); 47 explicit BrowserWindowGtk(Browser* browser);
43 virtual ~BrowserWindowGtk(); 48 virtual ~BrowserWindowGtk();
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 gfx::NativeWindow window); 147 gfx::NativeWindow window);
143 148
144 // Retrieves the GtkWindow associated with |xid|, which is the X Window 149 // Retrieves the GtkWindow associated with |xid|, which is the X Window
145 // ID of the top-level X window of this object. 150 // ID of the top-level X window of this object.
146 static GtkWindow* GetBrowserWindowForXID(XID xid); 151 static GtkWindow* GetBrowserWindowForXID(XID xid);
147 152
148 Browser* browser() { 153 Browser* browser() {
149 return browser_.get(); 154 return browser_.get();
150 } 155 }
151 156
157 GtkWindow* window() { return window_; }
158
152 protected: 159 protected:
153 virtual void DestroyBrowser(); 160 virtual void DestroyBrowser();
154 // Top level window. 161 // Top level window.
155 GtkWindow* window_; 162 GtkWindow* window_;
156 // GtkAlignment that holds the interior components of the chromium window. 163 // GtkAlignment that holds the interior components of the chromium window.
157 GtkWidget* window_container_; 164 GtkWidget* window_container_;
158 // VBox that holds everything below the tabs. 165 // VBox that holds everything below the tabs.
159 GtkWidget* content_vbox_; 166 GtkWidget* content_vbox_;
160 // VBox that holds everything below the toolbar. 167 // VBox that holds everything below the toolbar.
161 GtkWidget* render_area_vbox_; 168 GtkWidget* render_area_vbox_;
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
285 // The timer used to update frames for the Loading Animation. 292 // The timer used to update frames for the Loading Animation.
286 base::RepeatingTimer<BrowserWindowGtk> loading_animation_timer_; 293 base::RepeatingTimer<BrowserWindowGtk> loading_animation_timer_;
287 294
288 // Whether we're showing the custom chrome frame or the window manager 295 // Whether we're showing the custom chrome frame or the window manager
289 // decorations. 296 // decorations.
290 BooleanPrefMember use_custom_frame_; 297 BooleanPrefMember use_custom_frame_;
291 298
292 #if defined(LINUX2) 299 #if defined(LINUX2)
293 // True if a drag is active. See description above setter for details. 300 // True if a drag is active. See description above setter for details.
294 bool drag_active_; 301 bool drag_active_;
302 // Controls interactions with the window manager for popup panels.
303 PanelController* panel_controller_;
295 #endif 304 #endif
296 305
297 // A map which translates an X Window ID into its respective GtkWindow. 306 // A map which translates an X Window ID into its respective GtkWindow.
298 static std::map<XID, GtkWindow*> xid_map_; 307 static std::map<XID, GtkWindow*> xid_map_;
299 308
300 // The current window cursor. We set it to a resize cursor when over the 309 // The current window cursor. We set it to a resize cursor when over the
301 // custom frame border. We set it to NULL if we want the default cursor. 310 // custom frame border. We set it to NULL if we want the default cursor.
302 GdkCursor* frame_cursor_; 311 GdkCursor* frame_cursor_;
303 312
304 DISALLOW_COPY_AND_ASSIGN(BrowserWindowGtk); 313 DISALLOW_COPY_AND_ASSIGN(BrowserWindowGtk);
305 }; 314 };
306 315
307 #endif // CHROME_BROWSER_GTK_BROWSER_WINDOW_GTK_H_ 316 #endif // CHROME_BROWSER_GTK_BROWSER_WINDOW_GTK_H_
OLDNEW
« no previous file with comments | « chrome/browser/browser.cc ('k') | chrome/browser/gtk/browser_window_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698