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

Unified Diff: content/renderer/render_widget_mus.h

Issue 1461243002: [OLD ATTEMPT, DO NOT REVIEW] mustash: Enable connections to mus from the Chrome renderer Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed Ben's comments Created 5 years, 1 month 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 | « content/renderer/render_view_impl.cc ('k') | content/renderer/render_widget_mus.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/render_widget_mus.h
diff --git a/content/renderer/render_widget_mus.h b/content/renderer/render_widget_mus.h
new file mode 100644
index 0000000000000000000000000000000000000000..b0a31d348c7b4a367133c854d60861d2d0b7aaab
--- /dev/null
+++ b/content/renderer/render_widget_mus.h
@@ -0,0 +1,41 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CONTENT_RENDERER_RENDER_WIDGET_MUS_H_
+#define CONTENT_RENDERER_RENDER_WIDGET_MUS_H_
+
+#include "base/macros.h"
+#include "components/mus/public/cpp/window.h"
+#include "components/mus/public/cpp/window_observer.h"
+#include "components/mus/public/cpp/window_surface.h"
+#include "components/mus/public/cpp/window_tree_connection.h"
+#include "components/mus/public/cpp/window_tree_delegate.h"
+#include "mojo/public/cpp/bindings/binding.h"
+
+namespace content {
+
+class RenderWidgetMus : public mus::WindowTreeDelegate,
+ public mus::WindowObserver {
+ public:
+ explicit RenderWidgetMus(int routing_id);
+ ~RenderWidgetMus() override;
+
+ private:
+ // WindowTreeDelegate implementation:
+ void OnConnectionLost(mus::WindowTreeConnection* connection) override;
+ void OnEmbed(mus::Window* root) override;
+ void OnUnembed() override;
+ void OnWindowBoundsChanged(mus::Window* window,
+ const gfx::Rect& old_bounds,
+ const gfx::Rect& new_bounds) override;
+
+ scoped_ptr<mojo::Binding<mus::mojom::WindowTreeClient>> binding_;
+ scoped_ptr<mus::WindowSurface> surface_;
+
+ DISALLOW_COPY_AND_ASSIGN(RenderWidgetMus);
+};
+
+} // namespace content
+
+#endif // CONTENT_RENDERER_RENDER_WIDGET_MUS_H_
« no previous file with comments | « content/renderer/render_view_impl.cc ('k') | content/renderer/render_widget_mus.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698