Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef UI_VIEWS_WIDGET_DESKTOP_NATIVE_WIDGET_AURA_H_ | |
| 6 #define UI_VIEWS_WIDGET_DESKTOP_NATIVE_WIDGET_AURA_H_ | |
| 7 | |
| 8 #include "ui/aura/window_delegate.h" | |
| 9 #include "ui/views/widget/native_widget_private.h" | |
| 10 #include "ui/views/widget/widget.h" | |
| 11 | |
| 12 namespace views { | |
| 13 | |
| 14 class DesktopRootWindowHost; | |
| 15 | |
| 16 class VIEWS_EXPORT DesktopNativeWidgetAura | |
| 17 : public internal::NativeWidgetPrivate, | |
| 18 public aura::WindowDelegate { | |
| 19 public: | |
| 20 explicit DesktopNativeWidgetAura(internal::NativeWidgetDelegate* delegate); | |
| 21 virtual ~DesktopNativeWidgetAura(); | |
| 22 | |
| 23 private: | |
| 24 // Overridden from internal::NativeWidgetPrivate: | |
| 25 virtual void InitNativeWidget(const Widget::InitParams& params) OVERRIDE; | |
| 26 virtual NonClientFrameView* CreateNonClientFrameView() OVERRIDE; | |
| 27 virtual bool ShouldUseNativeFrame() const OVERRIDE; | |
| 28 virtual void FrameTypeChanged() OVERRIDE; | |
| 29 virtual Widget* GetWidget() OVERRIDE; | |
| 30 virtual const Widget* GetWidget() const OVERRIDE; | |
| 31 virtual gfx::NativeView GetNativeView() const OVERRIDE; | |
| 32 virtual gfx::NativeWindow GetNativeWindow() const OVERRIDE; | |
| 33 virtual Widget* GetTopLevelWidget() OVERRIDE; | |
| 34 virtual const ui::Compositor* GetCompositor() const OVERRIDE; | |
| 35 virtual ui::Compositor* GetCompositor() OVERRIDE; | |
| 36 virtual void CalculateOffsetToAncestorWithLayer( | |
| 37 gfx::Point* offset, | |
| 38 ui::Layer** layer_parent) OVERRIDE; | |
| 39 virtual void ViewRemoved(View* view) OVERRIDE; | |
| 40 virtual void SetNativeWindowProperty(const char* name, void* value) OVERRIDE; | |
| 41 virtual void* GetNativeWindowProperty(const char* name) const OVERRIDE; | |
| 42 virtual TooltipManager* GetTooltipManager() const OVERRIDE; | |
| 43 virtual bool IsScreenReaderActive() const OVERRIDE; | |
| 44 virtual void SendNativeAccessibilityEvent( | |
| 45 View* view, | |
| 46 ui::AccessibilityTypes::Event event_type) OVERRIDE; | |
| 47 virtual void SetCapture() OVERRIDE; | |
| 48 virtual void ReleaseCapture() OVERRIDE; | |
| 49 virtual bool HasCapture() const OVERRIDE; | |
| 50 virtual InputMethod* CreateInputMethod() OVERRIDE; | |
| 51 virtual internal::InputMethodDelegate* GetInputMethodDelegate() OVERRIDE; | |
| 52 virtual void CenterWindow(const gfx::Size& size) OVERRIDE; | |
| 53 virtual void GetWindowPlacement( | |
| 54 gfx::Rect* bounds, | |
| 55 ui::WindowShowState* maximized) const OVERRIDE; | |
| 56 virtual void SetWindowTitle(const string16& title) OVERRIDE; | |
| 57 virtual void SetWindowIcons(const gfx::ImageSkia& window_icon, | |
| 58 const gfx::ImageSkia& app_icon) OVERRIDE; | |
| 59 virtual void SetAccessibleName(const string16& name) OVERRIDE; | |
| 60 virtual void SetAccessibleRole(ui::AccessibilityTypes::Role role) OVERRIDE; | |
| 61 virtual void SetAccessibleState(ui::AccessibilityTypes::State state) OVERRIDE; | |
| 62 virtual void InitModalType(ui::ModalType modal_type) OVERRIDE; | |
| 63 virtual gfx::Rect GetWindowBoundsInScreen() const OVERRIDE; | |
| 64 virtual gfx::Rect GetClientAreaBoundsInScreen() const OVERRIDE; | |
| 65 virtual gfx::Rect GetRestoredBounds() const OVERRIDE; | |
| 66 virtual void SetBounds(const gfx::Rect& bounds) OVERRIDE; | |
| 67 virtual void SetSize(const gfx::Size& size) OVERRIDE; | |
| 68 virtual void StackAbove(gfx::NativeView native_view) OVERRIDE; | |
| 69 virtual void StackAtTop() OVERRIDE; | |
| 70 virtual void StackBelow(gfx::NativeView native_view) OVERRIDE; | |
| 71 virtual void SetShape(gfx::NativeRegion shape) OVERRIDE; | |
| 72 virtual void Close() OVERRIDE; | |
| 73 virtual void CloseNow() OVERRIDE; | |
| 74 virtual void Show() OVERRIDE; | |
| 75 virtual void Hide() OVERRIDE; | |
| 76 virtual void ShowMaximizedWithBounds( | |
| 77 const gfx::Rect& restored_bounds) OVERRIDE; | |
| 78 virtual void ShowWithWindowState(ui::WindowShowState state) OVERRIDE; | |
| 79 virtual bool IsVisible() const OVERRIDE; | |
| 80 virtual void Activate() OVERRIDE; | |
| 81 virtual void Deactivate() OVERRIDE; | |
| 82 virtual bool IsActive() const OVERRIDE; | |
| 83 virtual void SetAlwaysOnTop(bool always_on_top) OVERRIDE; | |
| 84 virtual void Maximize() OVERRIDE; | |
| 85 virtual void Minimize() OVERRIDE; | |
| 86 virtual bool IsMaximized() const OVERRIDE; | |
| 87 virtual bool IsMinimized() const OVERRIDE; | |
| 88 virtual void Restore() OVERRIDE; | |
| 89 virtual void SetFullscreen(bool fullscreen) OVERRIDE; | |
| 90 virtual bool IsFullscreen() const OVERRIDE; | |
| 91 virtual void SetOpacity(unsigned char opacity) OVERRIDE; | |
| 92 virtual void SetUseDragFrame(bool use_drag_frame) OVERRIDE; | |
| 93 virtual void FlashFrame(bool flash_frame) OVERRIDE; | |
| 94 virtual bool IsAccessibleWidget() const OVERRIDE; | |
| 95 virtual void RunShellDrag(View* view, | |
| 96 const ui::OSExchangeData& data, | |
| 97 const gfx::Point& location, | |
| 98 int operation) OVERRIDE; | |
| 99 virtual void SchedulePaintInRect(const gfx::Rect& rect) OVERRIDE; | |
| 100 virtual void SetCursor(gfx::NativeCursor cursor) OVERRIDE; | |
| 101 virtual void ClearNativeFocus() OVERRIDE; | |
| 102 virtual void FocusNativeView(gfx::NativeView native_view) OVERRIDE; | |
| 103 virtual gfx::Rect GetWorkAreaBoundsInScreen() const OVERRIDE; | |
| 104 virtual void SetInactiveRenderingDisabled(bool value) OVERRIDE; | |
| 105 virtual Widget::MoveLoopResult RunMoveLoop( | |
| 106 const gfx::Point& drag_offset) OVERRIDE; | |
| 107 virtual void EndMoveLoop() OVERRIDE; | |
| 108 virtual void SetVisibilityChangedAnimationsEnabled(bool value) OVERRIDE; | |
| 109 | |
| 110 // Overridden from aura::WindowDelegate: | |
| 111 virtual gfx::Size GetMinimumSize() const OVERRIDE; | |
| 112 virtual void OnBoundsChanged(const gfx::Rect& old_bounds, | |
| 113 const gfx::Rect& new_bounds) OVERRIDE; | |
| 114 virtual void OnFocus(aura::Window* old_focused_window) OVERRIDE; | |
| 115 virtual void OnBlur() OVERRIDE; | |
| 116 virtual bool OnKeyEvent(ui::KeyEvent* event) OVERRIDE; | |
| 117 virtual gfx::NativeCursor GetCursor(const gfx::Point& point) OVERRIDE; | |
| 118 virtual int GetNonClientComponent(const gfx::Point& point) const OVERRIDE; | |
| 119 virtual bool ShouldDescendIntoChildForEventHandling( | |
| 120 aura::Window* child, | |
| 121 const gfx::Point& location) OVERRIDE; | |
| 122 virtual bool OnMouseEvent(ui::MouseEvent* event) OVERRIDE; | |
| 123 virtual ui::TouchStatus OnTouchEvent(ui::TouchEvent* event) OVERRIDE; | |
| 124 virtual ui::GestureStatus OnGestureEvent( | |
| 125 ui::GestureEvent* event) OVERRIDE; | |
| 126 virtual bool CanFocus() OVERRIDE; | |
| 127 virtual void OnCaptureLost() OVERRIDE; | |
| 128 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE; | |
| 129 virtual void OnDeviceScaleFactorChanged(float device_scale_factor) OVERRIDE; | |
| 130 virtual void OnWindowDestroying() OVERRIDE; | |
| 131 virtual void OnWindowDestroyed() OVERRIDE; | |
| 132 virtual void OnWindowTargetVisibilityChanged(bool visible) OVERRIDE; | |
| 133 virtual bool HasHitTestMask() const OVERRIDE; | |
| 134 virtual void GetHitTestMask(gfx::Path* mask) const OVERRIDE; | |
| 135 | |
| 136 scoped_ptr<DesktopRootWindowHost> desktop_root_window_host_; | |
| 137 aura::Window* window_; | |
| 138 Widget::InitParams::Ownership ownership_; | |
| 139 internal::NativeWidgetDelegate* native_widget_delegate_; | |
|
sky
2012/08/31 22:58:59
You never set this.
| |
| 140 | |
| 141 DISALLOW_COPY_AND_ASSIGN(DesktopNativeWidgetAura); | |
| 142 }; | |
| 143 | |
| 144 } // namespace views | |
| 145 | |
| 146 #endif // UI_VIEWS_WIDGET_DESKTOP_NATIVE_WIDGET_AURA_H_ | |
| OLD | NEW |