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

Unified Diff: views/controls/native/native_view_host.h

Issue 5785001: A NativeViewHostViews class for embedding views inside NativeHostView instances. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed up the patchset to not include files that I pulled in by accident in #3 Created 10 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 side-by-side diff with in-line comments
Download patch
Index: views/controls/native/native_view_host.h
diff --git a/views/controls/native/native_view_host.h b/views/controls/native/native_view_host.h
index 4d4ba759bb84eb5f5dc654d46380e24116e54d2a..f2cd272218ccdee8123455d1756ad5616a115c1f 100644
--- a/views/controls/native/native_view_host.h
+++ b/views/controls/native/native_view_host.h
@@ -38,6 +38,9 @@ class NativeViewHost : public View {
// added to a View hierarchy hosted within a valid Widget.
void Attach(gfx::NativeView native_view);
+ // Attach a views::View instead of a native view to this host.
+ void AttachToView(View* view);
+
// Detach the attached window handle. Its bounds and visibility will no longer
// be manipulated by this View.
void Detach();
@@ -67,6 +70,9 @@ class NativeViewHost : public View {
// Accessor for |native_view_|.
gfx::NativeView native_view() const { return native_view_; }
+ // Accessor for |views_view_|.
+ View* views_view() const { return views_view_; }
+
void NativeViewDestroyed();
// Overridden from View:
@@ -87,9 +93,14 @@ class NativeViewHost : public View {
// detached because it's being destroyed, or false otherwise.
void Detach(bool destroyed);
- // The attached native view.
+ // The attached native view. There is exactly one native_view_ or views_view_
+ // attached.
gfx::NativeView native_view_;
+ // The attached view. There is exactly one native_view_ or views_view_
+ // attached.
+ View* views_view_;
+
// A platform-specific wrapper that does the OS-level manipulation of the
// attached gfx::NativeView.
scoped_ptr<NativeViewHostWrapper> native_wrapper_;
« no previous file with comments | « chrome/browser/ui/views/tab_contents/tab_contents_view_views.cc ('k') | views/controls/native/native_view_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698