Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(380)

Side by Side Diff: chrome/browser/ui/gtk/extensions/native_app_window_gtk.h

Issue 16702003: Move ShellWindow into apps component. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: yar Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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_NATIVE_APP_WINDOW_GTK_H_ 5 #ifndef CHROME_BROWSER_UI_GTK_EXTENSIONS_NATIVE_APP_WINDOW_GTK_H_
6 #define CHROME_BROWSER_UI_GTK_EXTENSIONS_NATIVE_APP_WINDOW_GTK_H_ 6 #define CHROME_BROWSER_UI_GTK_EXTENSIONS_NATIVE_APP_WINDOW_GTK_H_
7 7
8 #include <gtk/gtk.h> 8 #include <gtk/gtk.h>
9 9
10 #include "apps/shell_window.h"
10 #include "base/observer_list.h" 11 #include "base/observer_list.h"
11 #include "base/timer/timer.h" 12 #include "base/timer/timer.h"
12 #include "chrome/browser/ui/extensions/native_app_window.h" 13 #include "chrome/browser/ui/extensions/native_app_window.h"
13 #include "chrome/browser/ui/extensions/shell_window.h"
14 #include "chrome/browser/ui/gtk/extensions/extension_view_gtk.h" 14 #include "chrome/browser/ui/gtk/extensions/extension_view_gtk.h"
15 #include "third_party/skia/include/core/SkRegion.h" 15 #include "third_party/skia/include/core/SkRegion.h"
16 #include "ui/base/gtk/gtk_signal.h" 16 #include "ui/base/gtk/gtk_signal.h"
17 #include "ui/base/x/active_window_watcher_x_observer.h" 17 #include "ui/base/x/active_window_watcher_x_observer.h"
18 #include "ui/gfx/rect.h" 18 #include "ui/gfx/rect.h"
19 19
20 class ExtensionKeybindingRegistryGtk; 20 class ExtensionKeybindingRegistryGtk;
21 class Profile; 21 class Profile;
22 22
23 namespace extensions { 23 namespace extensions {
24 class Extension; 24 class Extension;
25 } 25 }
26 26
27 class NativeAppWindowGtk : public NativeAppWindow, 27 class NativeAppWindowGtk : public NativeAppWindow,
28 public ExtensionViewGtk::Container, 28 public ExtensionViewGtk::Container,
29 public ui::ActiveWindowWatcherXObserver { 29 public ui::ActiveWindowWatcherXObserver {
30 public: 30 public:
31 NativeAppWindowGtk(ShellWindow* shell_window, 31 NativeAppWindowGtk(apps::ShellWindow* shell_window,
32 const ShellWindow::CreateParams& params); 32 const apps::ShellWindow::CreateParams& params);
33 33
34 // ui::BaseWindow implementation. 34 // ui::BaseWindow implementation.
35 virtual bool IsActive() const OVERRIDE; 35 virtual bool IsActive() const OVERRIDE;
36 virtual bool IsMaximized() const OVERRIDE; 36 virtual bool IsMaximized() const OVERRIDE;
37 virtual bool IsMinimized() const OVERRIDE; 37 virtual bool IsMinimized() const OVERRIDE;
38 virtual bool IsFullscreen() const OVERRIDE; 38 virtual bool IsFullscreen() const OVERRIDE;
39 virtual bool IsDetached() const OVERRIDE; 39 virtual bool IsDetached() const OVERRIDE;
40 virtual gfx::NativeWindow GetNativeWindow() OVERRIDE; 40 virtual gfx::NativeWindow GetNativeWindow() OVERRIDE;
41 virtual gfx::Rect GetRestoredBounds() const OVERRIDE; 41 virtual gfx::Rect GetRestoredBounds() const OVERRIDE;
42 virtual ui::WindowShowState GetRestoredState() const OVERRIDE; 42 virtual ui::WindowShowState GetRestoredState() const OVERRIDE;
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 GdkEventConfigure*); 98 GdkEventConfigure*);
99 CHROMEGTK_CALLBACK_1(NativeAppWindowGtk, gboolean, OnWindowState, 99 CHROMEGTK_CALLBACK_1(NativeAppWindowGtk, gboolean, OnWindowState,
100 GdkEventWindowState*); 100 GdkEventWindowState*);
101 CHROMEGTK_CALLBACK_1(NativeAppWindowGtk, gboolean, OnMouseMoveEvent, 101 CHROMEGTK_CALLBACK_1(NativeAppWindowGtk, gboolean, OnMouseMoveEvent,
102 GdkEventMotion*); 102 GdkEventMotion*);
103 CHROMEGTK_CALLBACK_1(NativeAppWindowGtk, gboolean, OnButtonPress, 103 CHROMEGTK_CALLBACK_1(NativeAppWindowGtk, gboolean, OnButtonPress,
104 GdkEventButton*); 104 GdkEventButton*);
105 105
106 void OnDebouncedBoundsChanged(); 106 void OnDebouncedBoundsChanged();
107 107
108 ShellWindow* shell_window_; // weak - ShellWindow owns NativeAppWindow. 108 apps::ShellWindow* shell_window_; // weak - ShellWindow owns NativeAppWindow.
109 109
110 GtkWindow* window_; 110 GtkWindow* window_;
111 GdkWindowState state_; 111 GdkWindowState state_;
112 112
113 // True if the window manager thinks the window is active. Not all window 113 // True if the window manager thinks the window is active. Not all window
114 // managers keep track of this state (_NET_ACTIVE_WINDOW), in which case 114 // managers keep track of this state (_NET_ACTIVE_WINDOW), in which case
115 // this will always be true. 115 // this will always be true.
116 bool is_active_; 116 bool is_active_;
117 117
118 // The position and size of the current window. 118 // The position and size of the current window.
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 scoped_ptr<ExtensionKeybindingRegistryGtk> extension_keybinding_registry_; 152 scoped_ptr<ExtensionKeybindingRegistryGtk> extension_keybinding_registry_;
153 153
154 // Observers to be notified when any web contents modal dialog requires 154 // Observers to be notified when any web contents modal dialog requires
155 // updating its dimensions. 155 // updating its dimensions.
156 ObserverList<web_modal::WebContentsModalDialogHostObserver> observer_list_; 156 ObserverList<web_modal::WebContentsModalDialogHostObserver> observer_list_;
157 157
158 DISALLOW_COPY_AND_ASSIGN(NativeAppWindowGtk); 158 DISALLOW_COPY_AND_ASSIGN(NativeAppWindowGtk);
159 }; 159 };
160 160
161 #endif // CHROME_BROWSER_UI_GTK_EXTENSIONS_NATIVE_APP_WINDOW_GTK_H_ 161 #endif // CHROME_BROWSER_UI_GTK_EXTENSIONS_NATIVE_APP_WINDOW_GTK_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/extensions/shell_window.cc ('k') | chrome/browser/ui/gtk/extensions/native_app_window_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698