Chromium Code Reviews| 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 "chrome/browser/ui/extensions/shell_window.h" | 10 #include "chrome/browser/ui/extensions/shell_window.h" |
| 11 #include "chrome/browser/ui/gtk/extensions/extension_view_gtk.h" | 11 #include "chrome/browser/ui/gtk/extensions/extension_view_gtk.h" |
| 12 #include "ui/base/gtk/gtk_signal.h" | 12 #include "ui/base/gtk/gtk_signal.h" |
| 13 #include "ui/base/x/active_window_watcher_x_observer.h" | 13 #include "ui/base/x/active_window_watcher_x_observer.h" |
| 14 #include "ui/gfx/rect.h" | 14 #include "ui/gfx/rect.h" |
| 15 #include "ui/gfx/scoped_sk_region.h" | |
| 15 | 16 |
| 16 class Profile; | 17 class Profile; |
| 17 | 18 |
| 18 namespace extensions { | 19 namespace extensions { |
| 19 class Extension; | 20 class Extension; |
| 20 } | 21 } |
| 21 | 22 |
| 22 class ShellWindowGtk : public ShellWindow, | 23 class ShellWindowGtk : public ShellWindow, |
| 23 public ExtensionViewGtk::Container, | 24 public ExtensionViewGtk::Container, |
| 24 public ui::ActiveWindowWatcherXObserver { | 25 public ui::ActiveWindowWatcherXObserver { |
| (...skipping 27 matching lines...) Expand all Loading... | |
| 52 // ActiveWindowWatcherXObserver implementation. | 53 // ActiveWindowWatcherXObserver implementation. |
| 53 virtual void ActiveWindowChanged(GdkWindow* active_window) OVERRIDE; | 54 virtual void ActiveWindowChanged(GdkWindow* active_window) OVERRIDE; |
| 54 | 55 |
| 55 private: | 56 private: |
| 56 // ShellWindow implementation. | 57 // ShellWindow implementation. |
| 57 virtual void SetFullscreen(bool fullscreen) OVERRIDE; | 58 virtual void SetFullscreen(bool fullscreen) OVERRIDE; |
| 58 virtual bool IsFullscreenOrPending() const OVERRIDE; | 59 virtual bool IsFullscreenOrPending() const OVERRIDE; |
| 59 | 60 |
| 60 virtual ~ShellWindowGtk(); | 61 virtual ~ShellWindowGtk(); |
| 61 | 62 |
| 63 // content::WebContentsDelegate implementation. | |
| 64 virtual void UpdateDraggableRegions( | |
| 65 const std::vector<content::DraggableRegion>& regions) OVERRIDE; | |
|
jeremya
2012/08/08 04:38:37
Technically this isn't content::WebContentsDelegat
| |
| 66 | |
| 62 CHROMEGTK_CALLBACK_1(ShellWindowGtk, gboolean, OnMainWindowDeleteEvent, | 67 CHROMEGTK_CALLBACK_1(ShellWindowGtk, gboolean, OnMainWindowDeleteEvent, |
| 63 GdkEvent*); | 68 GdkEvent*); |
| 64 CHROMEGTK_CALLBACK_1(ShellWindowGtk, gboolean, OnConfigure, | 69 CHROMEGTK_CALLBACK_1(ShellWindowGtk, gboolean, OnConfigure, |
| 65 GdkEventConfigure*); | 70 GdkEventConfigure*); |
| 66 CHROMEGTK_CALLBACK_1(ShellWindowGtk, gboolean, OnWindowState, | 71 CHROMEGTK_CALLBACK_1(ShellWindowGtk, gboolean, OnWindowState, |
| 67 GdkEventWindowState*); | 72 GdkEventWindowState*); |
| 73 CHROMEGTK_CALLBACK_1(ShellWindowGtk, gboolean, OnButtonPress, | |
| 74 GdkEventButton*); | |
| 68 | 75 |
| 69 GtkWindow* window_; | 76 GtkWindow* window_; |
| 70 GdkWindowState state_; | 77 GdkWindowState state_; |
| 71 | 78 |
| 72 // True if the window manager thinks the window is active. Not all window | 79 // True if the window manager thinks the window is active. Not all window |
| 73 // managers keep track of this state (_NET_ACTIVE_WINDOW), in which case | 80 // managers keep track of this state (_NET_ACTIVE_WINDOW), in which case |
| 74 // this will always be true. | 81 // this will always be true. |
| 75 bool is_active_; | 82 bool is_active_; |
| 76 | 83 |
| 77 // The position and size of the current window. | 84 // The position and size of the current window. |
| 78 gfx::Rect bounds_; | 85 gfx::Rect bounds_; |
| 79 | 86 |
| 80 // The position and size of the non-maximized, non-fullscreen window. | 87 // The position and size of the non-maximized, non-fullscreen window. |
| 81 gfx::Rect restored_bounds_; | 88 gfx::Rect restored_bounds_; |
| 82 | 89 |
| 83 // True if the RVH is in fullscreen mode. The window may not actually be in | 90 // True if the RVH is in fullscreen mode. The window may not actually be in |
| 84 // fullscreen, however: some WMs don't support fullscreen. | 91 // fullscreen, however: some WMs don't support fullscreen. |
| 85 bool content_thinks_its_fullscreen_; | 92 bool content_thinks_its_fullscreen_; |
| 86 | 93 |
| 94 gfx::ScopedSkRegion draggable_region_; | |
|
Evan Stade
2012/08/07 23:20:58
I don't even know why this type exists. Why not ju
| |
| 95 bool frameless_; | |
| 96 | |
| 87 DISALLOW_COPY_AND_ASSIGN(ShellWindowGtk); | 97 DISALLOW_COPY_AND_ASSIGN(ShellWindowGtk); |
| 88 }; | 98 }; |
| 89 | 99 |
| 90 #endif // CHROME_BROWSER_UI_GTK_EXTENSIONS_SHELL_WINDOW_GTK_H_ | 100 #endif // CHROME_BROWSER_UI_GTK_EXTENSIONS_SHELL_WINDOW_GTK_H_ |
| OLD | NEW |