1 // Copyright 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_UI_GTK_BROWSER_WINDOW_GTK_H_
6 #define CHROME_BROWSER_UI_GTK_BROWSER_WINDOW_GTK_H_
12 #include "base/basictypes.h"
13 #include "base/compiler_specific.h"
14 #include "base/memory/scoped_ptr.h"
15 #include "base/prefs/pref_member.h"
16 #include "base/timer/timer.h"
17 #include "build/build_config.h"
18 #include "chrome/browser/devtools/devtools_window.h"
19 #include "chrome/browser/extensions/extension_keybinding_registry.h"
20 #include "chrome/browser/infobars/infobar_container.h"
21 #include "chrome/browser/ui/browser_window.h"
22 #include "chrome/browser/ui/host_desktop.h"
23 #include "chrome/browser/ui/tabs/tab_strip_model_observer.h"
24 #include "ui/base/gtk/gtk_floating_container.h"
25 #include "ui/base/gtk/gtk_signal.h"
26 #include "ui/base/ui_base_types.h"
27 #include "ui/base/x/active_window_watcher_x_observer.h"
28 #include "ui/base/x/x11_util.h"
29 #include "ui/gfx/rect.h"
33 class BrowserTitlebar
;
34 class BrowserToolbarGtk
;
36 class DownloadShelfGtk
;
37 class ExtensionKeybindingRegistryGtk
;
39 class FullscreenExitBubbleGtk
;
41 class InfoBarContainerGtk
;
42 class InstantOverlayControllerGtk
;
44 class StatusBubbleGtk
;
45 class TabContentsContainerGtk
;
49 class PasswordGenerator
;
52 namespace extensions
{
53 class ActiveTabPermissionGranter
;
57 namespace user_prefs
{
58 class PrefRegistrySyncable
;
61 // An implementation of BrowserWindow for GTK. Cross-platform code will interact
62 // with this object when it needs to manipulate the window.
63 class BrowserWindowGtk
64 : public BrowserWindow
,
65 public content::NotificationObserver
,
66 public TabStripModelObserver
,
67 public ui::ActiveWindowWatcherXObserver
,
68 public InfoBarContainer::Delegate
,
69 public extensions::ExtensionKeybindingRegistry::Delegate
{
71 explicit BrowserWindowGtk(Browser
* browser
);
72 virtual ~BrowserWindowGtk();
74 // Separating initialization from constructor.
77 // Overridden from BrowserWindow:
78 virtual void Show() OVERRIDE
;
79 virtual void ShowInactive() OVERRIDE
;
80 virtual void Hide() OVERRIDE
;
81 virtual void SetBounds(const gfx::Rect
& bounds
) OVERRIDE
;
82 virtual void Close() OVERRIDE
;
83 virtual void Activate() OVERRIDE
;
84 virtual void Deactivate() OVERRIDE
;
85 virtual bool IsActive() const OVERRIDE
;
86 virtual void FlashFrame(bool flash
) OVERRIDE
;
87 virtual bool IsAlwaysOnTop() const OVERRIDE
;
88 virtual void SetAlwaysOnTop(bool always_on_top
) OVERRIDE
;
89 virtual gfx::NativeWindow
GetNativeWindow() OVERRIDE
;
90 virtual BrowserWindowTesting
* GetBrowserWindowTesting() OVERRIDE
;
91 virtual StatusBubble
* GetStatusBubble() OVERRIDE
;
92 virtual void UpdateTitleBar() OVERRIDE
;
93 virtual void BookmarkBarStateChanged(
94 BookmarkBar::AnimateChangeType change_type
) OVERRIDE
;
95 virtual void UpdateDevTools() OVERRIDE
;
96 virtual void UpdateLoadingAnimations(bool should_animate
) OVERRIDE
;
97 virtual void SetStarredState(bool is_starred
) OVERRIDE
;
98 virtual void SetTranslateIconToggled(bool is_lit
) OVERRIDE
;
99 virtual void OnActiveTabChanged(content::WebContents
* old_contents
,
100 content::WebContents
* new_contents
,
102 int reason
) OVERRIDE
;
103 virtual void ZoomChangedForActiveTab(bool can_show_bubble
) OVERRIDE
;
104 virtual gfx::Rect
GetRestoredBounds() const OVERRIDE
;
105 virtual ui::WindowShowState
GetRestoredState() const OVERRIDE
;
106 virtual gfx::Rect
GetBounds() const OVERRIDE
;
107 virtual bool IsMaximized() const OVERRIDE
;
108 virtual bool IsMinimized() const OVERRIDE
;
109 virtual void Maximize() OVERRIDE
;
110 virtual void Minimize() OVERRIDE
;
111 virtual void Restore() OVERRIDE
;
112 virtual void EnterFullscreen(
113 const GURL
& url
, FullscreenExitBubbleType type
) OVERRIDE
;
114 virtual void ExitFullscreen() OVERRIDE
;
115 virtual void UpdateFullscreenExitBubbleContent(
117 FullscreenExitBubbleType bubble_type
) OVERRIDE
;
118 virtual bool ShouldHideUIForFullscreen() const OVERRIDE
;
119 virtual bool IsFullscreen() const OVERRIDE
;
120 virtual bool IsFullscreenBubbleVisible() const OVERRIDE
;
121 virtual LocationBar
* GetLocationBar() const OVERRIDE
;
122 virtual void SetFocusToLocationBar(bool select_all
) OVERRIDE
;
123 virtual void UpdateReloadStopState(bool is_loading
, bool force
) OVERRIDE
;
124 virtual void UpdateToolbar(content::WebContents
* contents
) OVERRIDE
;
125 virtual void FocusToolbar() OVERRIDE
;
126 virtual void FocusAppMenu() OVERRIDE
;
127 virtual void FocusBookmarksToolbar() OVERRIDE
;
128 virtual void FocusInfobars() OVERRIDE
;
129 virtual void RotatePaneFocus(bool forwards
) OVERRIDE
;
130 virtual bool IsBookmarkBarVisible() const OVERRIDE
;
131 virtual bool IsBookmarkBarAnimating() const OVERRIDE
;
132 virtual bool IsTabStripEditable() const OVERRIDE
;
133 virtual bool IsToolbarVisible() const OVERRIDE
;
134 virtual gfx::Rect
GetRootWindowResizerRect() const OVERRIDE
;
135 virtual void ConfirmAddSearchProvider(TemplateURL
* template_url
,
136 Profile
* profile
) OVERRIDE
;
137 virtual void ShowUpdateChromeDialog() OVERRIDE
;
138 virtual void ShowBookmarkBubble(const GURL
& url
,
139 bool already_bookmarked
) OVERRIDE
;
140 virtual void ShowTranslateBubble(
141 content::WebContents
* contents
,
142 TranslateBubbleModel::ViewState view_state
,
143 TranslateErrors::Type error_type
) OVERRIDE
;
144 #if defined(ENABLE_ONE_CLICK_SIGNIN)
145 virtual void ShowOneClickSigninBubble(
146 OneClickSigninBubbleType type
,
147 const base::string16
& email
,
148 const base::string16
& error_message
,
149 const StartSyncCallback
& start_sync_callback
) OVERRIDE
;
151 virtual bool IsDownloadShelfVisible() const OVERRIDE
;
152 virtual DownloadShelf
* GetDownloadShelf() OVERRIDE
;
153 virtual void ConfirmBrowserCloseWithPendingDownloads(
155 Browser::DownloadClosePreventionType dialog_type
,
157 const base::Callback
<void(bool)>& callback
) OVERRIDE
;
158 virtual void UserChangedTheme() OVERRIDE
;
159 virtual int GetExtraRenderViewHeight() const OVERRIDE
;
160 virtual void WebContentsFocused(content::WebContents
* contents
) OVERRIDE
;
161 virtual void ShowWebsiteSettings(Profile
* profile
,
162 content::WebContents
* web_contents
,
164 const content::SSLStatus
& ssl
) OVERRIDE
;
165 virtual void ShowAppMenu() OVERRIDE
;
166 virtual bool PreHandleKeyboardEvent(
167 const content::NativeWebKeyboardEvent
& event
,
168 bool* is_keyboard_shortcut
) OVERRIDE
;
169 virtual void HandleKeyboardEvent(
170 const content::NativeWebKeyboardEvent
& event
) OVERRIDE
;
171 virtual void Cut() OVERRIDE
;
172 virtual void Copy() OVERRIDE
;
173 virtual void Paste() OVERRIDE
;
174 virtual WindowOpenDisposition
GetDispositionForPopupBounds(
175 const gfx::Rect
& bounds
) OVERRIDE
;
176 virtual FindBar
* CreateFindBar() OVERRIDE
;
177 virtual web_modal::WebContentsModalDialogHost
*
178 GetWebContentsModalDialogHost() OVERRIDE
;
179 virtual void ShowAvatarBubble(content::WebContents
* web_contents
,
180 const gfx::Rect
& rect
) OVERRIDE
;
181 virtual void ShowAvatarBubbleFromAvatarButton() OVERRIDE
;
182 virtual void ShowPasswordGenerationBubble(
183 const gfx::Rect
& rect
,
184 const autofill::PasswordForm
& form
,
185 autofill::PasswordGenerator
* password_generator
) OVERRIDE
;
186 virtual int GetRenderViewHeightInsetWithDetachedBookmarkBar() OVERRIDE
;
188 // Overridden from NotificationObserver:
189 virtual void Observe(int type
,
190 const content::NotificationSource
& source
,
191 const content::NotificationDetails
& details
) OVERRIDE
;
193 // Overridden from TabStripModelObserver:
194 virtual void TabDetachedAt(content::WebContents
* contents
,
197 // Overridden from ActiveWindowWatcherXObserver.
198 virtual void ActiveWindowChanged(GdkWindow
* active_window
) OVERRIDE
;
200 // Overridden from InfoBarContainer::Delegate:
201 virtual SkColor
GetInfoBarSeparatorColor() const OVERRIDE
;
202 virtual void InfoBarContainerStateChanged(bool is_animating
) OVERRIDE
;
203 virtual bool DrawInfoBarArrows(int* x
) const OVERRIDE
;
205 // Overridden from ExtensionKeybindingRegistry::Delegate:
206 virtual extensions::ActiveTabPermissionGranter
*
207 GetActiveTabPermissionGranter() OVERRIDE
;
209 // Accessor for the tab strip.
210 TabStripGtk
* tabstrip() const { return tabstrip_
.get(); }
212 void OnDebouncedBoundsChanged();
214 // Request the underlying window to unmaximize.
217 // Returns false if we're not ready to close yet. E.g., a tab may have an
218 // onbeforeunload handler that prevents us from closing.
219 bool CanClose() const;
221 // Returns whether to draw the content drop shadow on the sides and bottom
222 // of the browser window. When false, we still draw a shadow on the top of
223 // the toolbar (under the tab strip), but do not round the top corners.
224 bool ShouldDrawContentDropShadow() const;
226 bool ShouldShowWindowIcon() const;
228 // Add the find bar widget to the window hierarchy.
229 void AddFindBar(FindBarGtk
* findbar
);
231 // Reset the mouse cursor to the default cursor if it was set to something
232 // else for the custom frame.
233 void ResetCustomFrameCursor();
235 // Returns the BrowserWindowGtk registered with |window|.
236 static BrowserWindowGtk
* GetBrowserWindowForNativeWindow(
237 gfx::NativeWindow window
);
239 // Retrieves the GtkWindow associated with |xid|, which is the X Window
240 // ID of the top-level X window of this object.
241 static GtkWindow
* GetBrowserWindowForXID(XID xid
);
243 Browser
* browser() const { return browser_
.get(); }
245 GtkWindow
* window() const { return window_
; }
247 BrowserTitlebar
* titlebar() const { return titlebar_
.get(); }
249 GtkWidget
* titlebar_widget() const;
251 BrowserToolbarGtk
* GetToolbar() { return toolbar_
.get(); }
253 gfx::Rect
bounds() const { return bounds_
; }
255 // Returns the tab we're currently displaying in the tab contents container.
256 content::WebContents
* GetDisplayedTab();
258 static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable
* registry
);
260 // Tells GTK that the toolbar area is invalidated and needs redrawing. We
261 // have this method as a hack because GTK doesn't queue the toolbar area for
262 // redraw when it should.
263 void QueueToolbarRedraw();
265 // Get the position where the infobar arrow should be anchored in
266 // |relative_to| coordinates. This is the middle of the omnibox location icon.
267 int GetXPositionOfLocationIcon(GtkWidget
* relative_to
);
269 // Show or hide the bookmark bar.
270 void MaybeShowBookmarkBar(bool animate
);
273 virtual void DestroyBrowser() OVERRIDE
;
275 // Checks to see if the mouse pointer at |x|, |y| is over the border of the
276 // custom frame (a spot that should trigger a window resize). Returns true if
277 // it should and sets |edge|.
278 bool GetWindowEdge(int x
, int y
, GdkWindowEdge
* edge
);
280 // Returns the window shape for the window with |width| and |height|.
281 // The caller is responsible for destroying the region if non-null region is
283 GdkRegion
* GetWindowShape(int width
, int height
) const;
285 // Save the window position in the prefs.
286 void SaveWindowPosition();
288 // Sets the default size for the window and the way the user is allowed to
290 void SetGeometryHints();
292 // Returns |true| if we should use the custom frame.
293 bool UseCustomFrame() const;
295 // Invalidate window to force repaint.
296 void InvalidateWindow();
298 // Top level window. NULL after the window starts closing.
300 // Determines whether window was shown.
301 bool window_has_shown_
;
302 // GtkAlignment that holds the interior components of the chromium window.
303 // This is used to draw the custom frame border and content shadow. Owned by
305 GtkWidget
* window_container_
;
306 // VBox that holds everything (tabs, toolbar, bookmarks bar, tab contents).
307 // Owned by window_container_.
308 GtkWidget
* window_vbox_
;
309 // VBox that holds everything below the toolbar. Owned by
310 // render_area_floating_container_.
311 GtkWidget
* render_area_vbox_
;
312 // Floating container that holds the render area. It is needed to position
313 // the findbar. Owned by render_area_event_box_.
314 GtkWidget
* render_area_floating_container_
;
315 // EventBox that holds render_area_floating_container_. Owned by window_vbox_.
316 GtkWidget
* render_area_event_box_
;
317 // Border between toolbar and render area. Owned by render_area_vbox_.
318 GtkWidget
* toolbar_border_
;
320 scoped_ptr
<Browser
> browser_
;
323 // Connect to signals on |window_|.
324 void ConnectHandlersToSignals();
326 // Create the various UI components.
329 // Set up background color of the window (depends on if we're incognito or
331 void SetBackgroundColor();
333 // Applies the window shape to if we're in custom drawing mode.
334 void UpdateWindowShape(int width
, int height
);
336 // Connect accelerators that aren't connected to menu items (like ctrl-o,
338 void ConnectAccelerators();
340 // Whether we should draw the tab background instead of the theme_frame
341 // background because this window is a popup.
342 bool UsingCustomPopupFrame() const;
344 // Draws the normal custom frame using theme_frame.
345 void DrawCustomFrame(cairo_t
* cr
, GtkWidget
* widget
, GdkEventExpose
* event
);
347 // Draws the tab image as the frame so we can write legible text.
348 void DrawPopupFrame(cairo_t
* cr
, GtkWidget
* widget
, GdkEventExpose
* event
);
350 // Draws the border, including resizable corners, for the custom frame.
351 void DrawCustomFrameBorder(GtkWidget
* widget
);
353 // Change whether we're showing the custom blue frame.
354 // Must be called once at startup.
355 // Triggers relayout of the content.
356 void UpdateCustomFrame();
358 // Set the bounds of the current window. If |exterior| is true, set the size
359 // of the window itself, otherwise set the bounds of the web contents.
360 // If |move| is true, set the position of the window, otherwise leave the
361 // position to the WM.
362 void SetBoundsImpl(const gfx::Rect
& bounds
, bool exterior
, bool move
);
364 CHROMEGTK_CALLBACK_1(BrowserWindowGtk
, gboolean
, OnConfigure
,
366 CHROMEGTK_CALLBACK_1(BrowserWindowGtk
, gboolean
, OnWindowState
,
367 GdkEventWindowState
*);
368 CHROMEGTK_CALLBACK_1(BrowserWindowGtk
, gboolean
, OnMainWindowDeleteEvent
,
370 CHROMEGTK_CALLBACK_0(BrowserWindowGtk
, void, OnMainWindowDestroy
);
371 // Callback for when the custom frame alignment needs to be redrawn.
372 // The content area includes the toolbar and web page but not the tab strip.
373 CHROMEGTK_CALLBACK_1(BrowserWindowGtk
, gboolean
, OnCustomFrameExpose
,
376 // A helper method that draws the shadow above the toolbar and in the frame
377 // border during an expose.
378 void DrawContentShadow(cairo_t
* cr
);
380 // The background frame image needs to be offset by the size of the top of
381 // the window to the top of the tabs when the full skyline isn't displayed
383 int GetVerticalOffset();
385 // Returns which frame image we should use based on the window's current
386 // activation state / incognito state.
387 int GetThemeFrameResource();
389 // Invalidate all the widgets that need to redraw when the infobar draw state
391 void InvalidateInfoBarBits();
393 // When the location icon moves, we have to redraw the arrow.
394 CHROMEGTK_CALLBACK_1(BrowserWindowGtk
, void, OnLocationIconSizeAllocate
,
397 // Used to draw the infobar arrow and drop shadow. This is connected to
398 // multiple widgets' expose events because it overlaps several widgets.
399 CHROMEGTK_CALLBACK_1(BrowserWindowGtk
, gboolean
, OnExposeDrawInfobarBits
,
402 // Used to draw the infobar bits for the bookmark bar. When the bookmark
403 // bar is in floating mode, it has to draw a drop shadow only; otherwise
404 // it is responsible for its portion of the arrow as well as some shadowing.
405 CHROMEGTK_CALLBACK_1(BrowserWindowGtk
, gboolean
, OnBookmarkBarExpose
,
408 // Callback for "size-allocate" signal on bookmark bar; this is relevant
409 // because when the bookmark bar changes dimensions, the infobar arrow has to
410 // change its shape, and we need to queue appropriate redraws.
411 CHROMEGTK_CALLBACK_1(BrowserWindowGtk
, void, OnBookmarkBarSizeAllocate
,
414 // Callback for accelerator activation. |user_data| stores the command id
415 // of the matched accelerator.
416 static gboolean
OnGtkAccelerator(GtkAccelGroup
* accel_group
,
417 GObject
* acceleratable
,
419 GdkModifierType modifier
,
422 // Key press event callback.
423 CHROMEGTK_CALLBACK_1(BrowserWindowGtk
, gboolean
, OnKeyPress
, GdkEventKey
*);
425 // Mouse move and mouse button press callbacks.
426 CHROMEGTK_CALLBACK_1(BrowserWindowGtk
, gboolean
, OnMouseMoveEvent
,
428 CHROMEGTK_CALLBACK_1(BrowserWindowGtk
, gboolean
, OnButtonPressEvent
,
431 // Tracks focus state of browser.
432 CHROMEGTK_CALLBACK_1(BrowserWindowGtk
, gboolean
, OnFocusIn
,
434 CHROMEGTK_CALLBACK_1(BrowserWindowGtk
, gboolean
, OnFocusOut
,
437 // Callback for the loading animation(s) associated with this window.
438 void LoadingAnimationCallback();
440 // Shows UI elements for supported window features.
441 void ShowSupportedWindowFeatures();
443 // Hides UI elements for unsupported window features.
444 void HideUnsupportedWindowFeatures();
446 // Helper functions that query |browser_| concerning support for UI features
447 // in this window. (For example, a popup window might not support a tabstrip).
448 bool IsTabStripSupported() const;
449 bool IsToolbarSupported() const;
450 bool IsBookmarkBarSupported() const;
452 // Put the bookmark bar where it belongs.
453 void PlaceBookmarkBar(bool is_floating
);
455 // Decides if we should draw the frame as if the window is active.
456 bool DrawFrameAsActive() const;
458 // Updates devtools window for given contents. This method will show docked
459 // devtools window for inspected |contents| that has docked devtools
460 // and hide it for NULL or not inspected |contents|. It will also make
461 // sure devtools window size and position are restored for given tab.
462 void UpdateDevToolsForContents(content::WebContents
* contents
);
464 // Shows docked devtools.
465 void ShowDevToolsContainer();
467 // Hides docked devtools.
468 void HideDevToolsContainer();
470 // Called when the preference changes.
471 void OnUseCustomChromeFrameChanged();
473 // Determine whether we use should default to native decorations or the custom
474 // frame based on the currently-running window manager.
475 static bool GetCustomFramePrefDefault();
477 // Handler for |devtools_floating_container_|'s "set-floating-position"
479 static void OnDevToolsContainerSetFloatingPosition(
480 GtkFloatingContainer
* container
, GtkAllocation
* allocation
,
481 BrowserWindowGtk
* browser_window
);
483 // The position and size of the current window.
486 // The configure bounds of the current window, used to figure out whether to
487 // ignore later configure events. See OnConfigure() for more information.
488 gfx::Rect configure_bounds_
;
490 // The position and size of the non-maximized, non-fullscreen window.
491 gfx::Rect restored_bounds_
;
493 GdkWindowState state_
;
495 // Controls a hidden GtkMenuBar that we keep updated so GNOME can take a look
496 // inside "our menu bar" and present it in the top panel, akin to Mac OS.
497 scoped_ptr
<GlobalMenuBar
> global_menu_bar_
;
499 // The container for the titlebar + tab strip.
500 scoped_ptr
<BrowserTitlebar
> titlebar_
;
502 // The object that manages all of the widgets in the toolbar.
503 scoped_ptr
<BrowserToolbarGtk
> toolbar_
;
505 // The object that manages the bookmark bar. This will be NULL if the
506 // bookmark bar is not supported.
507 scoped_ptr
<BookmarkBarGtk
> bookmark_bar_
;
509 // The download shelf view (view at the bottom of the page).
510 scoped_ptr
<DownloadShelfGtk
> download_shelf_
;
512 // The status bubble manager. Always non-NULL.
513 scoped_ptr
<StatusBubbleGtk
> status_bubble_
;
515 // A container that manages the GtkWidget*s that are the webpage display
516 // (along with associated infobars, shelves, and other things that are part
517 // of the content area).
518 scoped_ptr
<TabContentsContainerGtk
> contents_container_
;
520 // A container that manages the GtkWidget*s of developer tools for the
521 // selected tab contents.
522 scoped_ptr
<TabContentsContainerGtk
> devtools_container_
;
524 // The Extension Keybinding Registry responsible for registering listeners for
525 // accelerators that are sent to the window, that are destined to be turned
526 // into events and sent to the extension.
527 scoped_ptr
<ExtensionKeybindingRegistryGtk
> extension_keybinding_registry_
;
529 // Docked devtools window instance. NULL when current tab is not inspected
530 // or is inspected with undocked version of DevToolsWindow.
531 DevToolsWindow
* devtools_window_
;
533 // Insets from the sides of devtools_floating_container_ to the sides of
534 // contents_container_. Non-zero only if docked devtools is visible.
535 gfx::Insets contents_insets_
;
537 // Floating container for devtools_container_ and contents_container_.
538 // Owned by render_area_vbox_.
539 GtkWidget
* devtools_floating_container_
;
541 // The tab strip. Always non-NULL.
542 scoped_ptr
<TabStripGtk
> tabstrip_
;
544 // The container for info bars. Always non-NULL.
545 scoped_ptr
<InfoBarContainerGtk
> infobar_container_
;
547 // The timer used to update frames for the Loading Animation.
548 base::RepeatingTimer
<BrowserWindowGtk
> loading_animation_timer_
;
550 // The timer used to save the window position for session restore.
551 base::OneShotTimer
<BrowserWindowGtk
> window_configure_debounce_timer_
;
553 // Whether the custom chrome frame pref is set. Normally you want to use
554 // UseCustomFrame() above to determine whether to use the custom frame or
556 BooleanPrefMember use_custom_frame_pref_
;
558 // The current window cursor. We set it to a resize cursor when over the
559 // custom frame border. We set it to NULL if we want the default cursor.
560 GdkCursor
* frame_cursor_
;
562 // True if the window manager thinks the window is active. Not all window
563 // managers keep track of this state (_NET_ACTIVE_WINDOW), in which case
564 // this will always be true.
567 // Optionally maximize or minimize the window after we call
568 // BrowserWindow::Show for the first time. This is to work around a compiz
570 ui::WindowShowState show_state_after_show_
;
572 // If true, don't call gdk_window_raise() when we get a click in the title
573 // bar or window border. This is to work around a compiz bug.
574 bool suppress_window_raise_
;
576 // The accelerator group used to handle accelerators, owned by this object.
577 GtkAccelGroup
* accel_group_
;
579 // Set to true while this BrowserWindowGtk is fullscreened. This is needed
580 // because GTK cannot ensure requests to fullscreen the window will be honored
581 // by all window managers; and therefore bit-testing |state_| is not a
582 // reliable "is fullscreened" test. http://crbug.com/286545
585 scoped_ptr
<FullscreenExitBubbleGtk
> fullscreen_exit_bubble_
;
587 content::NotificationRegistrar registrar_
;
589 DISALLOW_COPY_AND_ASSIGN(BrowserWindowGtk
);
592 #endif // CHROME_BROWSER_UI_GTK_BROWSER_WINDOW_GTK_H_