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_AURA_H_ | 5 #ifndef UI_VIEWS_CONTROLS_NATIVE_NATIVE_VIEW_HOST_AURA_H_ |
6 #define UI_VIEWS_CONTROLS_NATIVE_NATIVE_VIEW_HOST_AURA_H_ | 6 #define UI_VIEWS_CONTROLS_NATIVE_NATIVE_VIEW_HOST_AURA_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
10 #include "base/memory/scoped_ptr.h" | |
10 #include "ui/aura/window_observer.h" | 11 #include "ui/aura/window_observer.h" |
12 #include "ui/compositor/layer.h" | |
11 #include "ui/views/controls/native/native_view_host_wrapper.h" | 13 #include "ui/views/controls/native/native_view_host_wrapper.h" |
12 #include "ui/views/views_export.h" | 14 #include "ui/views/views_export.h" |
13 | 15 |
14 namespace views { | 16 namespace views { |
15 | 17 |
16 class NativeViewHost; | 18 class NativeViewHost; |
17 | 19 |
18 // Aura implementation of NativeViewHostWrapper. | 20 // Aura implementation of NativeViewHostWrapper. |
19 class VIEWS_EXPORT NativeViewHostAura : public NativeViewHostWrapper, | 21 class VIEWS_EXPORT NativeViewHostAura : public NativeViewHostWrapper, |
20 public aura::WindowObserver { | 22 public aura::WindowObserver { |
(...skipping 11 matching lines...) Expand all Loading... | |
32 virtual void UninstallClip() OVERRIDE; | 34 virtual void UninstallClip() OVERRIDE; |
33 virtual void ShowWidget(int x, int y, int w, int h) OVERRIDE; | 35 virtual void ShowWidget(int x, int y, int w, int h) OVERRIDE; |
34 virtual void HideWidget() OVERRIDE; | 36 virtual void HideWidget() OVERRIDE; |
35 virtual void SetFocus() OVERRIDE; | 37 virtual void SetFocus() OVERRIDE; |
36 virtual gfx::NativeViewAccessible GetNativeViewAccessible() OVERRIDE; | 38 virtual gfx::NativeViewAccessible GetNativeViewAccessible() OVERRIDE; |
37 | 39 |
38 private: | 40 private: |
39 // Overridden from aura::WindowObserver: | 41 // Overridden from aura::WindowObserver: |
40 virtual void OnWindowDestroyed(aura::Window* window) OVERRIDE; | 42 virtual void OnWindowDestroyed(aura::Window* window) OVERRIDE; |
41 | 43 |
44 gfx::Point CalculateNewNativeViewOrigin(gfx::Rect input_rect, | |
sky
2013/09/24 20:23:25
const gfx::Rect& on these (same for CalculateCLipO
rharrison
2013/09/26 20:36:48
Done.
| |
45 gfx::Rect native_rect) const; | |
46 gfx::Point CalculateClipOrigin(gfx::Rect input_rect, | |
47 gfx::Rect native_rect) const; | |
48 float GetWidthFactor() const; | |
49 float GetHeightFactor() const; | |
50 | |
42 // Our associated NativeViewHost. | 51 // Our associated NativeViewHost. |
43 NativeViewHost* host_; | 52 NativeViewHost* host_; |
44 | 53 |
45 // Have we installed a clip region? | 54 // Have we installed a clip region? |
46 bool installed_clip_; | 55 bool installed_clip_; |
47 | 56 |
57 scoped_ptr<ui::Layer> clipping_layer_; | |
sky
2013/09/24 20:23:25
If the life of clipping_layer is the same as NVHA,
rharrison
2013/09/26 20:36:48
Done.
| |
58 | |
59 gfx::Rect orig_bounds_; | |
60 | |
48 DISALLOW_COPY_AND_ASSIGN(NativeViewHostAura); | 61 DISALLOW_COPY_AND_ASSIGN(NativeViewHostAura); |
49 }; | 62 }; |
50 | 63 |
51 } // namespace views | 64 } // namespace views |
52 | 65 |
53 #endif // UI_VIEWS_CONTROLS_NATIVE_NATIVE_VIEW_HOST_AURA_H_ | 66 #endif // UI_VIEWS_CONTROLS_NATIVE_NATIVE_VIEW_HOST_AURA_H_ |
OLD | NEW |