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