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

Side by Side Diff: ui/views/widget/desktop_aura/desktop_native_widget_aura.h

Issue 15827009: linux_aura: Close window when the OS requests it. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add paired removal. Created 7 years, 6 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
« no previous file with comments | « no previous file | ui/views/widget/desktop_aura/desktop_native_widget_aura.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_NATIVE_WIDGET_AURA_H_ 5 #ifndef UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_NATIVE_WIDGET_AURA_H_
6 #define UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_NATIVE_WIDGET_AURA_H_ 6 #define UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_NATIVE_WIDGET_AURA_H_
7 7
8 #include "base/memory/weak_ptr.h" 8 #include "base/memory/weak_ptr.h"
9 #include "ui/aura/client/activation_change_observer.h" 9 #include "ui/aura/client/activation_change_observer.h"
10 #include "ui/aura/client/activation_delegate.h" 10 #include "ui/aura/client/activation_delegate.h"
11 #include "ui/aura/client/drag_drop_delegate.h" 11 #include "ui/aura/client/drag_drop_delegate.h"
12 #include "ui/aura/client/focus_change_observer.h" 12 #include "ui/aura/client/focus_change_observer.h"
13 #include "ui/aura/root_window_observer.h"
13 #include "ui/aura/window_delegate.h" 14 #include "ui/aura/window_delegate.h"
14 #include "ui/views/ime/input_method_delegate.h" 15 #include "ui/views/ime/input_method_delegate.h"
15 #include "ui/views/widget/native_widget_private.h" 16 #include "ui/views/widget/native_widget_private.h"
16 17
17 namespace aura { 18 namespace aura {
18 class RootWindow; 19 class RootWindow;
19 namespace client { 20 namespace client {
20 class StackingClient; 21 class StackingClient;
21 } 22 }
22 } 23 }
(...skipping 14 matching lines...) Expand all
37 class NativeWidgetAuraWindowObserver; 38 class NativeWidgetAuraWindowObserver;
38 class TooltipManagerAura; 39 class TooltipManagerAura;
39 40
40 class VIEWS_EXPORT DesktopNativeWidgetAura 41 class VIEWS_EXPORT DesktopNativeWidgetAura
41 : public internal::NativeWidgetPrivate, 42 : public internal::NativeWidgetPrivate,
42 public aura::WindowDelegate, 43 public aura::WindowDelegate,
43 public aura::client::ActivationDelegate, 44 public aura::client::ActivationDelegate,
44 public aura::client::ActivationChangeObserver, 45 public aura::client::ActivationChangeObserver,
45 public aura::client::FocusChangeObserver, 46 public aura::client::FocusChangeObserver,
46 public views::internal::InputMethodDelegate, 47 public views::internal::InputMethodDelegate,
47 public aura::client::DragDropDelegate { 48 public aura::client::DragDropDelegate,
49 public aura::RootWindowObserver {
48 public: 50 public:
49 explicit DesktopNativeWidgetAura(internal::NativeWidgetDelegate* delegate); 51 explicit DesktopNativeWidgetAura(internal::NativeWidgetDelegate* delegate);
50 virtual ~DesktopNativeWidgetAura(); 52 virtual ~DesktopNativeWidgetAura();
51 53
52 // Maps from window to DesktopNativeWidgetAura. 54 // Maps from window to DesktopNativeWidgetAura.
53 static DesktopNativeWidgetAura* ForWindow(aura::Window* window); 55 static DesktopNativeWidgetAura* ForWindow(aura::Window* window);
54 56
55 // Called by our DesktopRootWindowHost after it has deleted native resources; 57 // Called by our DesktopRootWindowHost after it has deleted native resources;
56 // this is the signal that we should start our shutdown. 58 // this is the signal that we should start our shutdown.
57 void OnHostClosed(); 59 void OnHostClosed();
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 188
187 // Overridden from views::internal::InputMethodDelegate: 189 // Overridden from views::internal::InputMethodDelegate:
188 virtual void DispatchKeyEventPostIME(const ui::KeyEvent& key) OVERRIDE; 190 virtual void DispatchKeyEventPostIME(const ui::KeyEvent& key) OVERRIDE;
189 191
190 // Overridden from aura::client::DragDropDelegate: 192 // Overridden from aura::client::DragDropDelegate:
191 virtual void OnDragEntered(const ui::DropTargetEvent& event) OVERRIDE; 193 virtual void OnDragEntered(const ui::DropTargetEvent& event) OVERRIDE;
192 virtual int OnDragUpdated(const ui::DropTargetEvent& event) OVERRIDE; 194 virtual int OnDragUpdated(const ui::DropTargetEvent& event) OVERRIDE;
193 virtual void OnDragExited() OVERRIDE; 195 virtual void OnDragExited() OVERRIDE;
194 virtual int OnPerformDrop(const ui::DropTargetEvent& event) OVERRIDE; 196 virtual int OnPerformDrop(const ui::DropTargetEvent& event) OVERRIDE;
195 197
198 // Overridden from aura::RootWindowObserver:
199 virtual void OnRootWindowHostCloseRequested(
200 const aura::RootWindow* root) OVERRIDE;
201
196 private: 202 private:
197 // See class documentation for Widget in widget.h for a note about ownership. 203 // See class documentation for Widget in widget.h for a note about ownership.
198 Widget::InitParams::Ownership ownership_; 204 Widget::InitParams::Ownership ownership_;
199 205
200 // The NativeWidget owns the RootWindow. Required because the RootWindow owns 206 // The NativeWidget owns the RootWindow. Required because the RootWindow owns
201 // its RootWindowHost, so DesktopRootWindowHost can't own it. 207 // its RootWindowHost, so DesktopRootWindowHost can't own it.
202 scoped_ptr<aura::RootWindow> root_window_; 208 scoped_ptr<aura::RootWindow> root_window_;
203 209
204 // The following factory is used for calls to close the NativeWidgetAura 210 // The following factory is used for calls to close the NativeWidgetAura
205 // instance. 211 // instance.
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
237 bool restore_focus_on_activate_; 243 bool restore_focus_on_activate_;
238 244
239 scoped_ptr<corewm::ShadowController> shadow_controller_; 245 scoped_ptr<corewm::ShadowController> shadow_controller_;
240 246
241 DISALLOW_COPY_AND_ASSIGN(DesktopNativeWidgetAura); 247 DISALLOW_COPY_AND_ASSIGN(DesktopNativeWidgetAura);
242 }; 248 };
243 249
244 } // namespace views 250 } // namespace views
245 251
246 #endif // UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_NATIVE_WIDGET_AURA_H_ 252 #endif // UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_NATIVE_WIDGET_AURA_H_
OLDNEW
« no previous file with comments | « no previous file | ui/views/widget/desktop_aura/desktop_native_widget_aura.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698