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

Unified Diff: mojo/views/native_widget_view_manager.cc

Issue 341953002: Clean up WTH creation (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « mojo/views/native_widget_view_manager.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/views/native_widget_view_manager.cc
diff --git a/mojo/views/native_widget_view_manager.cc b/mojo/views/native_widget_view_manager.cc
index 2b342d8797086d25f61cadf39193526b31bac4b4..c5d32e1c498c92354d4daa3d71a75cef9477820e 100644
--- a/mojo/views/native_widget_view_manager.cc
+++ b/mojo/views/native_widget_view_manager.cc
@@ -86,11 +86,11 @@ class MinimalInputEventFilter : public ui::internal::InputMethodDelegate,
} // namespace
NativeWidgetViewManager::NativeWidgetViewManager(
- views::internal::NativeWidgetDelegate* delegate, view_manager::View* view)
+ views::internal::NativeWidgetDelegate* delegate, view_manager::Node* node)
: NativeWidgetAura(delegate),
- view_(view) {
- view_->AddObserver(this);
- window_tree_host_.reset(new WindowTreeHostMojo(gfx::Rect(800, 600), this));
+ node_(node) {
+ node_->active_view()->AddObserver(this);
+ window_tree_host_.reset(new WindowTreeHostMojo(node_, this));
window_tree_host_->InitHost();
ime_filter_.reset(
@@ -106,7 +106,7 @@ NativeWidgetViewManager::NativeWidgetViewManager(
}
NativeWidgetViewManager::~NativeWidgetViewManager() {
- view_->RemoveObserver(this);
+ node_->active_view()->RemoveObserver(this);
}
void NativeWidgetViewManager::InitNativeWidget(
@@ -118,7 +118,7 @@ void NativeWidgetViewManager::InitNativeWidget(
void NativeWidgetViewManager::CompositorContentsChanged(
const SkBitmap& bitmap) {
- view_->SetContents(bitmap);
+ node_->active_view()->SetContents(bitmap);
}
void NativeWidgetViewManager::OnViewInputEvent(view_manager::View* view,
« no previous file with comments | « mojo/views/native_widget_view_manager.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698