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

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

Issue 510004: Fix crash/leak issue in native_view_host_gtk.cc. (Closed)
Patch Set: " Created 11 years 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
« no previous file with comments | « views/controls/native/native_view_host_win.cc ('k') | views/controls/native_control_gtk.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. Use of this 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. Use of this
2 // source code is governed by a BSD-style license that can be found in the 2 // source code is governed by a BSD-style license that can be found in the
3 // LICENSE file. 3 // LICENSE file.
4 4
5 #ifndef VIEWS_CONTROLS_NATIVE_NATIVE_VIEW_HOST_WRAPPER_H_ 5 #ifndef VIEWS_CONTROLS_NATIVE_NATIVE_VIEW_HOST_WRAPPER_H_
6 #define VIEWS_CONTROLS_NATIVE_NATIVE_VIEW_HOST_WRAPPER_H_ 6 #define VIEWS_CONTROLS_NATIVE_NATIVE_VIEW_HOST_WRAPPER_H_
7 7
8 namespace views { 8 namespace views {
9 9
10 class NativeViewHost; 10 class NativeViewHost;
11 11
12 // An interface that implemented by an object that wraps a gfx::NativeView on 12 // An interface that implemented by an object that wraps a gfx::NativeView on
13 // a specific platform, used to perform platform specific operations on that 13 // a specific platform, used to perform platform specific operations on that
14 // native view when attached, detached, moved and sized. 14 // native view when attached, detached, moved and sized.
15 class NativeViewHostWrapper { 15 class NativeViewHostWrapper {
16 public: 16 public:
17 virtual ~NativeViewHostWrapper() {} 17 virtual ~NativeViewHostWrapper() {}
18 18
19 // Called when a gfx::NativeView has been attached to the associated 19 // Called when a gfx::NativeView has been attached to the associated
20 // NativeViewHost, allowing the wrapper to perform platform-specific 20 // NativeViewHost, allowing the wrapper to perform platform-specific
21 // initialization. 21 // initialization.
22 virtual void NativeViewAttached() = 0; 22 virtual void NativeViewAttached() = 0;
23 23
24 // Called before the attached gfx::NativeView is detached from the 24 // Called before the attached gfx::NativeView is detached from the
25 // NativeViewHost, allowing the wrapper to perform platform-specific 25 // NativeViewHost, allowing the wrapper to perform platform-specific
26 // cleanup. 26 // cleanup. |destroyed| is true if the native view is detached
27 virtual void NativeViewDetaching() = 0; 27 // because it's being destroyed, or false otherwise.
28 virtual void NativeViewDetaching(bool destroyed) = 0;
28 29
29 // Called when our associated NativeViewHost is added to a View hierarchy 30 // Called when our associated NativeViewHost is added to a View hierarchy
30 // rooted at a valid Widget. 31 // rooted at a valid Widget.
31 virtual void AddedToWidget() = 0; 32 virtual void AddedToWidget() = 0;
32 33
33 // Called when our associated NativeViewHost is removed from a View hierarchy 34 // Called when our associated NativeViewHost is removed from a View hierarchy
34 // rooted at a valid Widget. 35 // rooted at a valid Widget.
35 virtual void RemovedFromWidget() = 0; 36 virtual void RemovedFromWidget() = 0;
36 37
37 // Installs a clip on the gfx::NativeView. 38 // Installs a clip on the gfx::NativeView.
(...skipping 17 matching lines...) Expand all
55 virtual void SetFocus() = 0; 56 virtual void SetFocus() = 0;
56 57
57 // Creates a platform-specific instance of an object implementing this 58 // Creates a platform-specific instance of an object implementing this
58 // interface. 59 // interface.
59 static NativeViewHostWrapper* CreateWrapper(NativeViewHost* host); 60 static NativeViewHostWrapper* CreateWrapper(NativeViewHost* host);
60 }; 61 };
61 62
62 } // namespace views 63 } // namespace views
63 64
64 #endif // VIEWS_CONTROLS_NATIVE_NATIVE_VIEW_HOST_WRAPPER_H_ 65 #endif // VIEWS_CONTROLS_NATIVE_NATIVE_VIEW_HOST_WRAPPER_H_
OLDNEW
« no previous file with comments | « views/controls/native/native_view_host_win.cc ('k') | views/controls/native_control_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698