OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_UI_GTK_APPS_NATIVE_APP_WINDOW_GTK_H_ | 5 #ifndef CHROME_BROWSER_UI_GTK_APPS_NATIVE_APP_WINDOW_GTK_H_ |
6 #define CHROME_BROWSER_UI_GTK_APPS_NATIVE_APP_WINDOW_GTK_H_ | 6 #define CHROME_BROWSER_UI_GTK_APPS_NATIVE_APP_WINDOW_GTK_H_ |
7 | 7 |
8 #include <gtk/gtk.h> | 8 #include <gtk/gtk.h> |
9 | 9 |
10 #include "apps/native_app_window.h" | 10 #include "apps/native_app_window.h" |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 virtual void UpdateWindowTitle() OVERRIDE; | 73 virtual void UpdateWindowTitle() OVERRIDE; |
74 virtual void HandleKeyboardEvent( | 74 virtual void HandleKeyboardEvent( |
75 const content::NativeWebKeyboardEvent& event) OVERRIDE; | 75 const content::NativeWebKeyboardEvent& event) OVERRIDE; |
76 virtual void UpdateInputRegion(scoped_ptr<SkRegion> region) OVERRIDE; | 76 virtual void UpdateInputRegion(scoped_ptr<SkRegion> region) OVERRIDE; |
77 virtual void UpdateDraggableRegions( | 77 virtual void UpdateDraggableRegions( |
78 const std::vector<extensions::DraggableRegion>& regions) OVERRIDE; | 78 const std::vector<extensions::DraggableRegion>& regions) OVERRIDE; |
79 virtual gfx::Insets GetFrameInsets() const OVERRIDE; | 79 virtual gfx::Insets GetFrameInsets() const OVERRIDE; |
80 virtual bool IsVisible() const OVERRIDE; | 80 virtual bool IsVisible() const OVERRIDE; |
81 virtual void HideWithApp() OVERRIDE; | 81 virtual void HideWithApp() OVERRIDE; |
82 virtual void ShowWithApp() OVERRIDE; | 82 virtual void ShowWithApp() OVERRIDE; |
| 83 virtual void SetAlwaysOnTop(bool always_on_top) OVERRIDE; |
83 | 84 |
84 // web_modal::WebContentsModalDialogHost implementation. | 85 // web_modal::WebContentsModalDialogHost implementation. |
85 virtual gfx::NativeView GetHostView() const OVERRIDE; | 86 virtual gfx::NativeView GetHostView() const OVERRIDE; |
86 virtual gfx::Point GetDialogPosition(const gfx::Size& size) OVERRIDE; | 87 virtual gfx::Point GetDialogPosition(const gfx::Size& size) OVERRIDE; |
87 virtual gfx::Size GetMaximumDialogSize() OVERRIDE; | 88 virtual gfx::Size GetMaximumDialogSize() OVERRIDE; |
88 virtual void AddObserver( | 89 virtual void AddObserver( |
89 web_modal::ModalDialogHostObserver* observer) OVERRIDE; | 90 web_modal::ModalDialogHostObserver* observer) OVERRIDE; |
90 virtual void RemoveObserver( | 91 virtual void RemoveObserver( |
91 web_modal::ModalDialogHostObserver* observer) OVERRIDE; | 92 web_modal::ModalDialogHostObserver* observer) OVERRIDE; |
92 | 93 |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
147 // If true, don't call gdk_window_raise() when we get a click in the title | 148 // If true, don't call gdk_window_raise() when we get a click in the title |
148 // bar or window border. This is to work around a compiz bug. | 149 // bar or window border. This is to work around a compiz bug. |
149 bool suppress_window_raise_; | 150 bool suppress_window_raise_; |
150 | 151 |
151 // True if the window shows without frame. | 152 // True if the window shows without frame. |
152 bool frameless_; | 153 bool frameless_; |
153 | 154 |
154 // True if the window should be resizable by the user. | 155 // True if the window should be resizable by the user. |
155 bool resizable_; | 156 bool resizable_; |
156 | 157 |
| 158 // True if the window should be kept on top of other windows that do not have |
| 159 // this flag enabled. |
| 160 bool always_on_top_; |
| 161 |
157 // The current window cursor. We set it to a resize cursor when over the | 162 // The current window cursor. We set it to a resize cursor when over the |
158 // custom frame border. We set it to NULL if we want the default cursor. | 163 // custom frame border. We set it to NULL if we want the default cursor. |
159 GdkCursor* frame_cursor_; | 164 GdkCursor* frame_cursor_; |
160 | 165 |
161 // The timer used to save the window position for session restore. | 166 // The timer used to save the window position for session restore. |
162 base::OneShotTimer<NativeAppWindowGtk> window_configure_debounce_timer_; | 167 base::OneShotTimer<NativeAppWindowGtk> window_configure_debounce_timer_; |
163 | 168 |
164 // The Extension Keybinding Registry responsible for registering listeners for | 169 // The Extension Keybinding Registry responsible for registering listeners for |
165 // accelerators that are sent to the window, that are destined to be turned | 170 // accelerators that are sent to the window, that are destined to be turned |
166 // into events and sent to the extension. | 171 // into events and sent to the extension. |
167 scoped_ptr<ExtensionKeybindingRegistryGtk> extension_keybinding_registry_; | 172 scoped_ptr<ExtensionKeybindingRegistryGtk> extension_keybinding_registry_; |
168 | 173 |
169 // Observers to be notified when any web contents modal dialog requires | 174 // Observers to be notified when any web contents modal dialog requires |
170 // updating its dimensions. | 175 // updating its dimensions. |
171 ObserverList<web_modal::ModalDialogHostObserver> observer_list_; | 176 ObserverList<web_modal::ModalDialogHostObserver> observer_list_; |
172 | 177 |
173 ui::X11AtomCache atom_cache_; | 178 ui::X11AtomCache atom_cache_; |
174 | 179 |
175 // True if we listen for the XEvent. | 180 // True if we listen for the XEvent. |
176 bool is_x_event_listened_; | 181 bool is_x_event_listened_; |
177 | 182 |
178 DISALLOW_COPY_AND_ASSIGN(NativeAppWindowGtk); | 183 DISALLOW_COPY_AND_ASSIGN(NativeAppWindowGtk); |
179 }; | 184 }; |
180 | 185 |
181 #endif // CHROME_BROWSER_UI_GTK_APPS_NATIVE_APP_WINDOW_GTK_H_ | 186 #endif // CHROME_BROWSER_UI_GTK_APPS_NATIVE_APP_WINDOW_GTK_H_ |
OLD | NEW |