| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_EXTENSIONS_SHELL_WINDOW_GTK_H_ | 5 #ifndef CHROME_BROWSER_UI_GTK_EXTENSIONS_SHELL_WINDOW_GTK_H_ |
| 6 #define CHROME_BROWSER_UI_GTK_EXTENSIONS_SHELL_WINDOW_GTK_H_ | 6 #define CHROME_BROWSER_UI_GTK_EXTENSIONS_SHELL_WINDOW_GTK_H_ |
| 7 | 7 |
| 8 #include <gtk/gtk.h> | 8 #include <gtk/gtk.h> |
| 9 | 9 |
| 10 #include "base/timer.h" |
| 10 #include "chrome/browser/ui/extensions/native_shell_window.h" | 11 #include "chrome/browser/ui/extensions/native_shell_window.h" |
| 11 #include "chrome/browser/ui/extensions/shell_window.h" | 12 #include "chrome/browser/ui/extensions/shell_window.h" |
| 12 #include "chrome/browser/ui/gtk/extensions/extension_view_gtk.h" | 13 #include "chrome/browser/ui/gtk/extensions/extension_view_gtk.h" |
| 13 #include "third_party/skia/include/core/SkRegion.h" | 14 #include "third_party/skia/include/core/SkRegion.h" |
| 14 #include "ui/base/gtk/gtk_signal.h" | 15 #include "ui/base/gtk/gtk_signal.h" |
| 15 #include "ui/base/x/active_window_watcher_x_observer.h" | 16 #include "ui/base/x/active_window_watcher_x_observer.h" |
| 16 #include "ui/gfx/rect.h" | 17 #include "ui/gfx/rect.h" |
| 17 | 18 |
| 18 class Profile; | 19 class Profile; |
| 19 | 20 |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 | 74 |
| 74 CHROMEGTK_CALLBACK_1(ShellWindowGtk, gboolean, OnMainWindowDeleteEvent, | 75 CHROMEGTK_CALLBACK_1(ShellWindowGtk, gboolean, OnMainWindowDeleteEvent, |
| 75 GdkEvent*); | 76 GdkEvent*); |
| 76 CHROMEGTK_CALLBACK_1(ShellWindowGtk, gboolean, OnConfigure, | 77 CHROMEGTK_CALLBACK_1(ShellWindowGtk, gboolean, OnConfigure, |
| 77 GdkEventConfigure*); | 78 GdkEventConfigure*); |
| 78 CHROMEGTK_CALLBACK_1(ShellWindowGtk, gboolean, OnWindowState, | 79 CHROMEGTK_CALLBACK_1(ShellWindowGtk, gboolean, OnWindowState, |
| 79 GdkEventWindowState*); | 80 GdkEventWindowState*); |
| 80 CHROMEGTK_CALLBACK_1(ShellWindowGtk, gboolean, OnButtonPress, | 81 CHROMEGTK_CALLBACK_1(ShellWindowGtk, gboolean, OnButtonPress, |
| 81 GdkEventButton*); | 82 GdkEventButton*); |
| 82 | 83 |
| 84 void OnDebouncedBoundsChanged(); |
| 85 |
| 83 ShellWindow* shell_window_; // weak - ShellWindow owns NativeShellWindow. | 86 ShellWindow* shell_window_; // weak - ShellWindow owns NativeShellWindow. |
| 84 | 87 |
| 85 GtkWindow* window_; | 88 GtkWindow* window_; |
| 86 GdkWindowState state_; | 89 GdkWindowState state_; |
| 87 | 90 |
| 88 // True if the window manager thinks the window is active. Not all window | 91 // True if the window manager thinks the window is active. Not all window |
| 89 // managers keep track of this state (_NET_ACTIVE_WINDOW), in which case | 92 // managers keep track of this state (_NET_ACTIVE_WINDOW), in which case |
| 90 // this will always be true. | 93 // this will always be true. |
| 91 bool is_active_; | 94 bool is_active_; |
| 92 | 95 |
| (...skipping 11 matching lines...) Expand all Loading... |
| 104 // and double clicked to maximize. | 107 // and double clicked to maximize. |
| 105 SkRegion draggable_region_; | 108 SkRegion draggable_region_; |
| 106 | 109 |
| 107 // If true, don't call gdk_window_raise() when we get a click in the title | 110 // If true, don't call gdk_window_raise() when we get a click in the title |
| 108 // bar or window border. This is to work around a compiz bug. | 111 // bar or window border. This is to work around a compiz bug. |
| 109 bool suppress_window_raise_; | 112 bool suppress_window_raise_; |
| 110 | 113 |
| 111 // True if the window shows without frame. | 114 // True if the window shows without frame. |
| 112 bool frameless_; | 115 bool frameless_; |
| 113 | 116 |
| 117 // The timer used to save the window position for session restore. |
| 118 base::OneShotTimer<ShellWindowGtk> window_configure_debounce_timer_; |
| 119 |
| 114 DISALLOW_COPY_AND_ASSIGN(ShellWindowGtk); | 120 DISALLOW_COPY_AND_ASSIGN(ShellWindowGtk); |
| 115 }; | 121 }; |
| 116 | 122 |
| 117 #endif // CHROME_BROWSER_UI_GTK_EXTENSIONS_SHELL_WINDOW_GTK_H_ | 123 #endif // CHROME_BROWSER_UI_GTK_EXTENSIONS_SHELL_WINDOW_GTK_H_ |
| OLD | NEW |