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

Unified Diff: services/navigation/view_impl.cc

Issue 2301353003: Changes ownership of WindowTreeClient (Closed)
Patch Set: fix navigation Created 4 years, 3 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 | « services/navigation/view_impl.h ('k') | services/ui/demo/mus_demo.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/navigation/view_impl.cc
diff --git a/services/navigation/view_impl.cc b/services/navigation/view_impl.cc
index 22999a87e2256c2bdd33aa6a1b6274203b1ea803..de69b0537c53dcf7a4dcbf3abf048200c36f13cf 100644
--- a/services/navigation/view_impl.cc
+++ b/services/navigation/view_impl.cc
@@ -4,6 +4,7 @@
#include "services/navigation/view_impl.h"
+#include "base/memory/ptr_util.h"
#include "base/strings/utf_string_conversions.h"
#include "content/public/browser/browser_context.h"
#include "content/public/browser/interstitial_page.h"
@@ -112,7 +113,8 @@ void ViewImpl::Stop() {
}
void ViewImpl::GetWindowTreeClient(ui::mojom::WindowTreeClientRequest request) {
- new ui::WindowTreeClient(this, nullptr, std::move(request));
+ window_tree_client_ =
+ base::MakeUnique<ui::WindowTreeClient>(this, nullptr, std::move(request));
}
void ViewImpl::ShowInterstitial(const mojo::String& html) {
@@ -280,7 +282,14 @@ void ViewImpl::OnEmbed(ui::Window* root) {
widget_->Show();
}
-void ViewImpl::OnDidDestroyClient(ui::WindowTreeClient* client) {}
+void ViewImpl::OnEmbedRootDestroyed(ui::Window* root) {
+ window_tree_client_.reset();
+}
+
+void ViewImpl::OnLostConnection(ui::WindowTreeClient* client) {
+ window_tree_client_.reset();
+}
+
void ViewImpl::OnPointerEventObserved(const ui::PointerEvent& event,
ui::Window* target) {}
« no previous file with comments | « services/navigation/view_impl.h ('k') | services/ui/demo/mus_demo.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698