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

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

Issue 13588007: Implement WebContentsModalDialogManagerDelegate for ShellWindow (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add OVERRIDEs Created 7 years, 8 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 "base/observer_list.h"
jeremya 2013/04/04 19:59:17 Would it make more sense to have ShellWindow be th
Mike Wittman 2013/04/04 22:56:08 I don't think so. The NativeWidget subclasses are
10 #include "base/timer.h" 11 #include "base/timer.h"
11 #include "chrome/browser/ui/extensions/native_app_window.h" 12 #include "chrome/browser/ui/extensions/native_app_window.h"
12 #include "chrome/browser/ui/extensions/shell_window.h" 13 #include "chrome/browser/ui/extensions/shell_window.h"
13 #include "chrome/browser/ui/gtk/extensions/extension_view_gtk.h" 14 #include "chrome/browser/ui/gtk/extensions/extension_view_gtk.h"
14 #include "third_party/skia/include/core/SkRegion.h" 15 #include "third_party/skia/include/core/SkRegion.h"
15 #include "ui/base/gtk/gtk_signal.h" 16 #include "ui/base/gtk/gtk_signal.h"
16 #include "ui/base/x/active_window_watcher_x_observer.h" 17 #include "ui/base/x/active_window_watcher_x_observer.h"
17 #include "ui/gfx/rect.h" 18 #include "ui/gfx/rect.h"
18 19
19 class ExtensionKeybindingRegistryGtk; 20 class ExtensionKeybindingRegistryGtk;
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 virtual bool IsFullscreenOrPending() const OVERRIDE; 61 virtual bool IsFullscreenOrPending() const OVERRIDE;
61 virtual void UpdateWindowIcon() OVERRIDE; 62 virtual void UpdateWindowIcon() OVERRIDE;
62 virtual void UpdateWindowTitle() OVERRIDE; 63 virtual void UpdateWindowTitle() OVERRIDE;
63 virtual void HandleKeyboardEvent( 64 virtual void HandleKeyboardEvent(
64 const content::NativeWebKeyboardEvent& event) OVERRIDE; 65 const content::NativeWebKeyboardEvent& event) OVERRIDE;
65 virtual void UpdateDraggableRegions( 66 virtual void UpdateDraggableRegions(
66 const std::vector<extensions::DraggableRegion>& regions) OVERRIDE; 67 const std::vector<extensions::DraggableRegion>& regions) OVERRIDE;
67 virtual void RenderViewHostChanged() OVERRIDE; 68 virtual void RenderViewHostChanged() OVERRIDE;
68 virtual gfx::Insets GetFrameInsets() const OVERRIDE; 69 virtual gfx::Insets GetFrameInsets() const OVERRIDE;
69 70
71 // WebContentsModalDialogHost implementation.
72 virtual gfx::Point GetDialogPosition(const gfx::Size& size) OVERRIDE;
73
74 virtual void AddObserver(
75 WebContentsModalDialogHostObserver* observer) OVERRIDE;
76 virtual void RemoveObserver(
77 WebContentsModalDialogHostObserver* observer) OVERRIDE;
78
70 content::WebContents* web_contents() const { 79 content::WebContents* web_contents() const {
71 return shell_window_->web_contents(); 80 return shell_window_->web_contents();
72 } 81 }
73 const extensions::Extension* extension() const { 82 const extensions::Extension* extension() const {
74 return shell_window_->extension(); 83 return shell_window_->extension();
75 } 84 }
76 85
77 virtual ~NativeAppWindowGtk(); 86 virtual ~NativeAppWindowGtk();
78 87
79 // If the point (|x|, |y|) is within the resize border area of the window, 88 // If the point (|x|, |y|) is within the resize border area of the window,
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 GdkCursor* frame_cursor_; 142 GdkCursor* frame_cursor_;
134 143
135 // The timer used to save the window position for session restore. 144 // The timer used to save the window position for session restore.
136 base::OneShotTimer<NativeAppWindowGtk> window_configure_debounce_timer_; 145 base::OneShotTimer<NativeAppWindowGtk> window_configure_debounce_timer_;
137 146
138 // The Extension Keybinding Registry responsible for registering listeners for 147 // The Extension Keybinding Registry responsible for registering listeners for
139 // accelerators that are sent to the window, that are destined to be turned 148 // accelerators that are sent to the window, that are destined to be turned
140 // into events and sent to the extension. 149 // into events and sent to the extension.
141 scoped_ptr<ExtensionKeybindingRegistryGtk> extension_keybinding_registry_; 150 scoped_ptr<ExtensionKeybindingRegistryGtk> extension_keybinding_registry_;
142 151
152 // Observers to be notified when any web contents modal dialog requires
153 // updating its dimensions.
154 ObserverList<WebContentsModalDialogHostObserver> observer_list_;
155
143 DISALLOW_COPY_AND_ASSIGN(NativeAppWindowGtk); 156 DISALLOW_COPY_AND_ASSIGN(NativeAppWindowGtk);
144 }; 157 };
145 158
146 #endif // CHROME_BROWSER_UI_GTK_EXTENSIONS_NATIVE_APP_WINDOW_GTK_H_ 159 #endif // CHROME_BROWSER_UI_GTK_EXTENSIONS_NATIVE_APP_WINDOW_GTK_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698