OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_CONTROLS_NATIVE_NATIVE_VIEW_HOST_H_ | 5 #ifndef UI_VIEWS_CONTROLS_NATIVE_NATIVE_VIEW_HOST_H_ |
6 #define UI_VIEWS_CONTROLS_NATIVE_NATIVE_VIEW_HOST_H_ | 6 #define UI_VIEWS_CONTROLS_NATIVE_NATIVE_VIEW_HOST_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "ui/gfx/native_widget_types.h" | 10 #include "ui/gfx/native_widget_types.h" |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 bool fast_resize_at_last_layout() const { | 72 bool fast_resize_at_last_layout() const { |
73 return fast_resize_at_last_layout_; | 73 return fast_resize_at_last_layout_; |
74 } | 74 } |
75 | 75 |
76 // Accessor for |native_view_|. | 76 // Accessor for |native_view_|. |
77 gfx::NativeView native_view() const { return native_view_; } | 77 gfx::NativeView native_view() const { return native_view_; } |
78 | 78 |
79 void NativeViewDestroyed(); | 79 void NativeViewDestroyed(); |
80 | 80 |
81 // Overridden from View: | 81 // Overridden from View: |
82 virtual gfx::Size GetPreferredSize() const OVERRIDE; | 82 virtual gfx::Size GetPreferredSize() const override; |
83 virtual void Layout() OVERRIDE; | 83 virtual void Layout() override; |
84 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE; | 84 virtual void OnPaint(gfx::Canvas* canvas) override; |
85 virtual void VisibilityChanged(View* starting_from, bool is_visible) OVERRIDE; | 85 virtual void VisibilityChanged(View* starting_from, bool is_visible) override; |
86 virtual void OnFocus() OVERRIDE; | 86 virtual void OnFocus() override; |
87 virtual gfx::NativeViewAccessible GetNativeViewAccessible() OVERRIDE; | 87 virtual gfx::NativeViewAccessible GetNativeViewAccessible() override; |
88 virtual gfx::NativeCursor GetCursor(const ui::MouseEvent& event) OVERRIDE; | 88 virtual gfx::NativeCursor GetCursor(const ui::MouseEvent& event) override; |
89 | 89 |
90 protected: | 90 protected: |
91 virtual bool GetNeedsNotificationWhenVisibleBoundsChange() const OVERRIDE; | 91 virtual bool GetNeedsNotificationWhenVisibleBoundsChange() const override; |
92 virtual void OnVisibleBoundsChanged() OVERRIDE; | 92 virtual void OnVisibleBoundsChanged() override; |
93 virtual void ViewHierarchyChanged( | 93 virtual void ViewHierarchyChanged( |
94 const ViewHierarchyChangedDetails& details) OVERRIDE; | 94 const ViewHierarchyChangedDetails& details) override; |
95 virtual const char* GetClassName() const OVERRIDE; | 95 virtual const char* GetClassName() const override; |
96 | 96 |
97 private: | 97 private: |
98 friend class test::NativeViewHostTestBase; | 98 friend class test::NativeViewHostTestBase; |
99 | 99 |
100 // Detach the native view. |destroyed| is true if the native view is | 100 // Detach the native view. |destroyed| is true if the native view is |
101 // detached because it's being destroyed, or false otherwise. | 101 // detached because it's being destroyed, or false otherwise. |
102 void Detach(bool destroyed); | 102 void Detach(bool destroyed); |
103 | 103 |
104 // Invokes ViewRemoved() on the FocusManager for all the child Widgets of our | 104 // Invokes ViewRemoved() on the FocusManager for all the child Widgets of our |
105 // NativeView. This is used when detaching to ensure the FocusManager doesn't | 105 // NativeView. This is used when detaching to ensure the FocusManager doesn't |
(...skipping 19 matching lines...) Expand all Loading... |
125 | 125 |
126 // The view that should be given focus when this NativeViewHost is focused. | 126 // The view that should be given focus when this NativeViewHost is focused. |
127 View* focus_view_; | 127 View* focus_view_; |
128 | 128 |
129 DISALLOW_COPY_AND_ASSIGN(NativeViewHost); | 129 DISALLOW_COPY_AND_ASSIGN(NativeViewHost); |
130 }; | 130 }; |
131 | 131 |
132 } // namespace views | 132 } // namespace views |
133 | 133 |
134 #endif // UI_VIEWS_CONTROLS_NATIVE_NATIVE_VIEW_HOST_H_ | 134 #endif // UI_VIEWS_CONTROLS_NATIVE_NATIVE_VIEW_HOST_H_ |
OLD | NEW |