| 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 UI_VIEWS_WIDGET_NATIVE_WIDGET_AURA_H_ | 5 #ifndef UI_VIEWS_WIDGET_NATIVE_WIDGET_AURA_H_ |
| 6 #define UI_VIEWS_WIDGET_NATIVE_WIDGET_AURA_H_ | 6 #define UI_VIEWS_WIDGET_NATIVE_WIDGET_AURA_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 22 matching lines...) Expand all Loading... |
| 33 | 33 |
| 34 class VIEWS_EXPORT NativeWidgetAura | 34 class VIEWS_EXPORT NativeWidgetAura |
| 35 : public internal::NativeWidgetPrivate, | 35 : public internal::NativeWidgetPrivate, |
| 36 public aura::WindowDelegate, | 36 public aura::WindowDelegate, |
| 37 public aura::WindowObserver, | 37 public aura::WindowObserver, |
| 38 public aura::client::ActivationDelegate, | 38 public aura::client::ActivationDelegate, |
| 39 public aura::client::ActivationChangeObserver, | 39 public aura::client::ActivationChangeObserver, |
| 40 public aura::client::FocusChangeObserver, | 40 public aura::client::FocusChangeObserver, |
| 41 public aura::client::DragDropDelegate { | 41 public aura::client::DragDropDelegate { |
| 42 public: | 42 public: |
| 43 explicit NativeWidgetAura(internal::NativeWidgetDelegate* delegate); | 43 explicit NativeWidgetAura(internal::NativeWidgetDelegate* delegate, |
| 44 bool is_parallel_widget_in_window_manager = false); |
| 44 | 45 |
| 45 // Called internally by NativeWidgetAura and DesktopNativeWidgetAura to | 46 // Called internally by NativeWidgetAura and DesktopNativeWidgetAura to |
| 46 // associate |native_widget| with |window|. | 47 // associate |native_widget| with |window|. |
| 47 static void RegisterNativeWidgetForWindow( | 48 static void RegisterNativeWidgetForWindow( |
| 48 internal::NativeWidgetPrivate* native_widget, | 49 internal::NativeWidgetPrivate* native_widget, |
| 49 aura::Window* window); | 50 aura::Window* window); |
| 50 | 51 |
| 51 // Assign an icon to aura window. | 52 // Assign an icon to aura window. |
| 52 static void AssignIconToAuraWindow(aura::Window* window, | 53 static void AssignIconToAuraWindow(aura::Window* window, |
| 53 const gfx::ImageSkia& window_icon, | 54 const gfx::ImageSkia& window_icon, |
| (...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 194 ~NativeWidgetAura() override; | 195 ~NativeWidgetAura() override; |
| 195 | 196 |
| 196 internal::NativeWidgetDelegate* delegate() { return delegate_; } | 197 internal::NativeWidgetDelegate* delegate() { return delegate_; } |
| 197 | 198 |
| 198 private: | 199 private: |
| 199 bool IsDocked() const; | 200 bool IsDocked() const; |
| 200 void SetInitialFocus(ui::WindowShowState show_state); | 201 void SetInitialFocus(ui::WindowShowState show_state); |
| 201 | 202 |
| 202 internal::NativeWidgetDelegate* delegate_; | 203 internal::NativeWidgetDelegate* delegate_; |
| 203 | 204 |
| 205 // True if the Widget is created in the window-manager and another client is |
| 206 // embedded in it. When true certain operations are not performed. |
| 207 const bool is_parallel_widget_in_window_manager_; |
| 208 |
| 204 // WARNING: set to NULL when destroyed. As the Widget is not necessarily | 209 // WARNING: set to NULL when destroyed. As the Widget is not necessarily |
| 205 // destroyed along with |window_| all usage of |window_| should first verify | 210 // destroyed along with |window_| all usage of |window_| should first verify |
| 206 // non-NULL. | 211 // non-NULL. |
| 207 aura::Window* window_; | 212 aura::Window* window_; |
| 208 | 213 |
| 209 // See class documentation for Widget in widget.h for a note about ownership. | 214 // See class documentation for Widget in widget.h for a note about ownership. |
| 210 Widget::InitParams::Ownership ownership_; | 215 Widget::InitParams::Ownership ownership_; |
| 211 | 216 |
| 212 // Are we in the destructor? | 217 // Are we in the destructor? |
| 213 bool destroying_; | 218 bool destroying_; |
| (...skipping 18 matching lines...) Expand all Loading... |
| 232 // The following factory is used for calls to close the NativeWidgetAura | 237 // The following factory is used for calls to close the NativeWidgetAura |
| 233 // instance. | 238 // instance. |
| 234 base::WeakPtrFactory<NativeWidgetAura> close_widget_factory_; | 239 base::WeakPtrFactory<NativeWidgetAura> close_widget_factory_; |
| 235 | 240 |
| 236 DISALLOW_COPY_AND_ASSIGN(NativeWidgetAura); | 241 DISALLOW_COPY_AND_ASSIGN(NativeWidgetAura); |
| 237 }; | 242 }; |
| 238 | 243 |
| 239 } // namespace views | 244 } // namespace views |
| 240 | 245 |
| 241 #endif // UI_VIEWS_WIDGET_NATIVE_WIDGET_AURA_H_ | 246 #endif // UI_VIEWS_WIDGET_NATIVE_WIDGET_AURA_H_ |
| OLD | NEW |