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

Side by Side Diff: ui/views/controls/native/native_view_host_wrapper.h

Issue 24299004: Implement features in NativeViewHostAura for scroll end effect (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Responded to sky's comments and added some testing Created 7 years, 2 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
OLDNEW
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_WRAPPER_H_ 5 #ifndef UI_VIEWS_CONTROLS_NATIVE_NATIVE_VIEW_HOST_WRAPPER_H_
6 #define UI_VIEWS_CONTROLS_NATIVE_NATIVE_VIEW_HOST_WRAPPER_H_ 6 #define UI_VIEWS_CONTROLS_NATIVE_NATIVE_VIEW_HOST_WRAPPER_H_
7 7
8 #include "ui/gfx/native_widget_types.h" 8 #include "ui/gfx/native_widget_types.h"
9 #include "ui/views/views_export.h" 9 #include "ui/views/views_export.h"
10 10
11 namespace views { 11 namespace views {
12 12
13 class NativeViewHost; 13 class NativeViewHost;
14 14
15 // An interface that implemented by an object that wraps a gfx::NativeView on 15 // An interface that implemented by an object that wraps a gfx::NativeView on
16 // a specific platform, used to perform platform specific operations on that 16 // a specific platform, used to perform platform specific operations on that
17 // native view when attached, detached, moved and sized. 17 // native view when attached, detached, moved and sized.
18 class VIEWS_EXPORT NativeViewHostWrapper { 18 class VIEWS_EXPORT NativeViewHostWrapper {
19 public: 19 public:
20 virtual ~NativeViewHostWrapper() {} 20 virtual ~NativeViewHostWrapper() {}
21 21
22 // Called right before a gfx::NativeView is attached to the associated 22 // Called right before a gfx::NativeView is attached to the associated
23 // NativeViewHost, allowing the wrapper to perform platform-specific 23 // NativeViewHost, allowing the wrapper to perform platform-specific
24 // initialization. 24 // initialization.
25 virtual void NativeViewWillAttach() = 0; 25 virtual void NativeViewWillAttach() = 0;
26 26
27 // Called at the end of attaching a gfx::NativeView to the associated
28 // NativeViewHost, allowing the wrapper to perform platform-specific
29 // operations that need to occur after the gfx::NativeView is attached.
30 virtual void NativeViewAttached() = 0;
31
27 // Called before the attached gfx::NativeView is detached from the 32 // Called before the attached gfx::NativeView is detached from the
28 // NativeViewHost, allowing the wrapper to perform platform-specific 33 // NativeViewHost, allowing the wrapper to perform platform-specific
29 // cleanup. |destroyed| is true if the native view is detached 34 // cleanup. |destroyed| is true if the native view is detached
30 // because it's being destroyed, or false otherwise. 35 // because it's being destroyed, or false otherwise.
31 virtual void NativeViewDetaching(bool destroyed) = 0; 36 virtual void NativeViewDetaching(bool destroyed) = 0;
32 37
33 // Called when our associated NativeViewHost is added to a View hierarchy 38 // Called when our associated NativeViewHost is added to a View hierarchy
34 // rooted at a valid Widget. 39 // rooted at a valid Widget.
35 virtual void AddedToWidget() = 0; 40 virtual void AddedToWidget() = 0;
36 41
(...skipping 26 matching lines...) Expand all
63 virtual gfx::NativeViewAccessible GetNativeViewAccessible() = 0; 68 virtual gfx::NativeViewAccessible GetNativeViewAccessible() = 0;
64 69
65 // Creates a platform-specific instance of an object implementing this 70 // Creates a platform-specific instance of an object implementing this
66 // interface. 71 // interface.
67 static NativeViewHostWrapper* CreateWrapper(NativeViewHost* host); 72 static NativeViewHostWrapper* CreateWrapper(NativeViewHost* host);
68 }; 73 };
69 74
70 } // namespace views 75 } // namespace views
71 76
72 #endif // UI_VIEWS_CONTROLS_NATIVE_NATIVE_VIEW_HOST_WRAPPER_H_ 77 #endif // UI_VIEWS_CONTROLS_NATIVE_NATIVE_VIEW_HOST_WRAPPER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698