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

Side by Side Diff: content/browser/renderer_host/render_widget_host_view_mus.h

Issue 1476643002: mustash: Enable connections to mus from the Chrome renderer [take 2] (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Don't create a RenderWidgetWindowTreeeClientFactory in tests 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"
9 #include "content/browser/renderer_host/render_widget_host_view_base.h" 11 #include "content/browser/renderer_host/render_widget_host_view_base.h"
12 #include "content/public/browser/render_process_host_observer.h"
10 13
11 namespace content { 14 namespace content {
12 15
13 class RenderWidgetHost; 16 class RenderWidgetHost;
14 class RenderWidgetHostImpl; 17 class RenderWidgetHostImpl;
15 struct NativeWebKeyboardEvent; 18 struct NativeWebKeyboardEvent;
16 19
17 // See comments in render_widget_host_view.h about this class and its members. 20 // 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 21 // 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 22 // the mojo shell and use the Mandoline UI Service (Mus). Mus is responsible for
20 // windowing, compositing, and input event dispatch. The purpose of 23 // windowing, compositing, and input event dispatch. The purpose of
21 // RenderWidgetHostViewMus is to manage the mus::Window owned by the content 24 // RenderWidgetHostViewMus is to manage the mus::Window owned by the content
22 // embedder. The browser is the owner of the mus::Window, controlling properties 25 // 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 26 // 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 27 // are managed by Mus directly. Input event routing will be plumbed directly to
25 // the renderer from Mus. 28 // the renderer from Mus.
26 class CONTENT_EXPORT RenderWidgetHostViewMus : public RenderWidgetHostViewBase { 29 class CONTENT_EXPORT RenderWidgetHostViewMus : public RenderWidgetHostViewBase {
27 public: 30 public:
28 RenderWidgetHostViewMus( 31 RenderWidgetHostViewMus(
32 mus::Window* parent_window,
29 RenderWidgetHostImpl* widget, 33 RenderWidgetHostImpl* widget,
30 base::WeakPtr<RenderWidgetHostViewBase> platform_view); 34 base::WeakPtr<RenderWidgetHostViewBase> platform_view);
31 ~RenderWidgetHostViewMus() override; 35 ~RenderWidgetHostViewMus() override;
32 36
33 private: 37 private:
34 // RenderWidgetHostView implementation. 38 // RenderWidgetHostView implementation.
35 void InitAsChild(gfx::NativeView parent_view) override; 39 void InitAsChild(gfx::NativeView parent_view) override;
36 RenderWidgetHost* GetRenderWidgetHost() const override; 40 RenderWidgetHost* GetRenderWidgetHost() const override;
37 void SetSize(const gfx::Size& size) override; 41 void SetSize(const gfx::Size& size) override;
38 void SetBounds(const gfx::Rect& rect) override; 42 void SetBounds(const gfx::Rect& rect) override;
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 void LockCompositingSurface() override; 116 void LockCompositingSurface() override;
113 void UnlockCompositingSurface() override; 117 void UnlockCompositingSurface() override;
114 118
115 #if defined(OS_WIN) 119 #if defined(OS_WIN)
116 void SetParentNativeViewAccessible( 120 void SetParentNativeViewAccessible(
117 gfx::NativeViewAccessible accessible_parent) override; 121 gfx::NativeViewAccessible accessible_parent) override;
118 gfx::NativeViewId GetParentForWindowlessPlugin() const override; 122 gfx::NativeViewId GetParentForWindowlessPlugin() const override;
119 #endif 123 #endif
120 124
121 RenderWidgetHostImpl* host_; 125 RenderWidgetHostImpl* host_;
126 scoped_ptr<mus::ScopedWindowPtr> window_;
122 gfx::Size size_; 127 gfx::Size size_;
123 // The platform view for this RenderWidgetHostView. 128 // The platform view for this RenderWidgetHostView.
124 // RenderWidgetHostViewMus mostly only cares about stuff related to 129 // RenderWidgetHostViewMus mostly only cares about stuff related to
125 // compositing, the rest are directly forwared to this |platform_view_|. 130 // compositing, the rest are directly forwared to this |platform_view_|.
126 base::WeakPtr<RenderWidgetHostViewBase> platform_view_; 131 base::WeakPtr<RenderWidgetHostViewBase> platform_view_;
127 132
128 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewMus); 133 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewMus);
129 }; 134 };
130 135
131 } // namespace content 136 } // namespace content
132 137
133 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MUS_H_ 138 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MUS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698