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

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

Issue 114059: Refactors HWNDView, NativeViewHostGtk and NativeViewHost so that they match t... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 6 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
« no previous file with comments | « views/controls/native/native_view_host_win.cc ('k') | views/controls/native_control.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // LICENSE file.
4
5 #ifndef VIEWS_CONTROLS_NATIVE_NATIVE_VIEW_HOST_WRAPPER_H_
6 #define VIEWS_CONTROLS_NATIVE_NATIVE_VIEW_HOST_WRAPPER_H_
7
8 namespace views {
9
10 class NativeViewHost;
11
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
14 // native view when attached, detached, moved and sized.
15 class NativeViewHostWrapper {
16 public:
17 // Called when a gfx::NativeView has been attached to the associated
18 // NativeViewHost, allowing the wrapper to perform platform-specific
19 // initialization.
20 virtual void NativeViewAttached() = 0;
21
22 // Called before the attached gfx::NativeView is detached from the
23 // NativeViewHost, allowing the wrapper to perform platform-specific
24 // cleanup.
25 virtual void NativeViewDetaching() = 0;
26
27 // Called when our associated NativeViewHost is added to a View hierarchy
28 // rooted at a valid Widget.
29 virtual void AddedToWidget() = 0;
30
31 // Called when our associated NativeViewHost is removed from a View hierarchy
32 // rooted at a valid Widget.
33 virtual void RemovedFromWidget() = 0;
34
35 // Installs a clip on the gfx::NativeView.
36 virtual void InstallClip(int x, int y, int w, int h) = 0;
37
38 // Whether or not a clip has been installed on the wrapped gfx::NativeView.
39 virtual bool HasInstalledClip() = 0;
40
41 // Removes the clip installed on the gfx::NativeView by way of InstallClip.
42 virtual void UninstallClip() = 0;
43
44 // Shows the gfx::NativeView at the specified position (relative to the parent
45 // native view).
46 virtual void ShowWidget(int x, int y, int w, int h) = 0;
47
48 // Hides the gfx::NativeView. NOTE: this may be invoked when the native view
49 // is already hidden.
50 virtual void HideWidget() = 0;
51
52 // Sets focus to the gfx::NativeView.
53 virtual void SetFocus() = 0;
54
55 // Creates a platform-specific instance of an object implementing this
56 // interface.
57 static NativeViewHostWrapper* CreateWrapper(NativeViewHost* host);
58 };
59
60 } // namespace views
61
62 #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.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698