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

Side by Side Diff: content/browser/renderer_host/render_widget_host_view_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: Invert connection creation flow. Needs lots of work. Created 5 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MUS_H_ 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MUS_H_
6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MUS_H_ 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MUS_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "components/mus/public/cpp/scoped_window_ptr.h"
10 #include "components/mus/public/cpp/window.h"
11 #include "components/mus/public/interfaces/window_tree.mojom.h"
9 #include "content/browser/renderer_host/render_widget_host_view_base.h" 12 #include "content/browser/renderer_host/render_widget_host_view_base.h"
13 #include "content/public/browser/render_process_host_observer.h"
10 14
11 namespace content { 15 namespace content {
12 16
13 class RenderWidgetHost; 17 class RenderWidgetHost;
14 class RenderWidgetHostImpl; 18 class RenderWidgetHostImpl;
15 struct NativeWebKeyboardEvent; 19 struct NativeWebKeyboardEvent;
16 20
17 // See comments in render_widget_host_view.h about this class and its members. 21 // See comments in render_widget_host_view.h about this class and its members.
18 // This version of RenderWidgetHostView is for builds of Chrome that run through 22 // This version of RenderWidgetHostView is for builds of Chrome that run through
19 // the mojo shell and use the Mandoline UI Service (Mus). Mus is responsible for 23 // the mojo shell and use the Mandoline UI Service (Mus). Mus is responsible for
20 // windowing, compositing, and input event dispatch. The purpose of 24 // windowing, compositing, and input event dispatch. The purpose of
21 // RenderWidgetHostViewMus is to manage the mus::Window owned by the content 25 // RenderWidgetHostViewMus is to manage the mus::Window owned by the content
22 // embedder. The browser is the owner of the mus::Window, controlling properties 26 // embedder. The browser is the owner of the mus::Window, controlling properties
23 // such as visibility, and bounds. Some aspects such as input, focus, and cursor 27 // such as visibility, and bounds. Some aspects such as input, focus, and cursor
24 // are managed by Mus directly. Input event routing will be plumbed directly to 28 // are managed by Mus directly. Input event routing will be plumbed directly to
25 // the renderer from Mus. 29 // the renderer from Mus.
26 class CONTENT_EXPORT RenderWidgetHostViewMus : public RenderWidgetHostViewBase { 30 class CONTENT_EXPORT RenderWidgetHostViewMus
31 : public RenderWidgetHostViewBase {
27 public: 32 public:
28 RenderWidgetHostViewMus( 33 RenderWidgetHostViewMus(
34 mus::Window* parent_window,
29 RenderWidgetHostImpl* widget, 35 RenderWidgetHostImpl* widget,
30 base::WeakPtr<RenderWidgetHostViewBase> platform_view); 36 base::WeakPtr<RenderWidgetHostViewBase> platform_view);
31 ~RenderWidgetHostViewMus() override; 37 ~RenderWidgetHostViewMus() override;
32 38
39 void EmbedWindowTreeClient(mus::mojom::WindowTreeClientPtr tree_client);
40
33 private: 41 private:
34 // RenderWidgetHostView implementation. 42 // RenderWidgetHostView implementation.
35 void InitAsChild(gfx::NativeView parent_view) override; 43 void InitAsChild(gfx::NativeView parent_view) override;
36 RenderWidgetHost* GetRenderWidgetHost() const override; 44 RenderWidgetHost* GetRenderWidgetHost() const override;
37 void SetSize(const gfx::Size& size) override; 45 void SetSize(const gfx::Size& size) override;
38 void SetBounds(const gfx::Rect& rect) override; 46 void SetBounds(const gfx::Rect& rect) override;
39 void Focus() override; 47 void Focus() override;
40 bool HasFocus() const override; 48 bool HasFocus() const override;
41 bool IsSurfaceAvailableForCopy() const override; 49 bool IsSurfaceAvailableForCopy() const override;
42 void Show() override; 50 void Show() override;
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 void LockCompositingSurface() override; 120 void LockCompositingSurface() override;
113 void UnlockCompositingSurface() override; 121 void UnlockCompositingSurface() override;
114 122
115 #if defined(OS_WIN) 123 #if defined(OS_WIN)
116 void SetParentNativeViewAccessible( 124 void SetParentNativeViewAccessible(
117 gfx::NativeViewAccessible accessible_parent) override; 125 gfx::NativeViewAccessible accessible_parent) override;
118 gfx::NativeViewId GetParentForWindowlessPlugin() const override; 126 gfx::NativeViewId GetParentForWindowlessPlugin() const override;
119 #endif 127 #endif
120 128
121 RenderWidgetHostImpl* host_; 129 RenderWidgetHostImpl* host_;
122 gfx::Size size_; 130 scoped_ptr<mus::ScopedWindowPtr> window_;
131 mus::mojom::WindowTreeClientPtr window_tree_client_;
Fady Samuel 2015/11/24 04:42:38 Delete this.
123 // The platform view for this RenderWidgetHostView. 132 // The platform view for this RenderWidgetHostView.
124 // RenderWidgetHostViewMus mostly only cares about stuff related to 133 // RenderWidgetHostViewMus mostly only cares about stuff related to
125 // compositing, the rest are directly forwared to this |platform_view_|. 134 // compositing, the rest are directly forwared to this |platform_view_|.
126 base::WeakPtr<RenderWidgetHostViewBase> platform_view_; 135 base::WeakPtr<RenderWidgetHostViewBase> platform_view_;
127 136
128 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewMus); 137 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewMus);
129 }; 138 };
130 139
131 } // namespace content 140 } // namespace content
132 141
133 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MUS_H_ 142 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MUS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698