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

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

Issue 2089183003: mus: Introduce API for embedder to dispatch event to the embeded client. Base URL: https://chromium.googlesource.com/chromium/src.git@mus-parent-window-receives-child-event
Patch Set: Created 4 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 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 <stddef.h> 8 #include <stddef.h>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
11 #include "base/memory/weak_ptr.h"
11 #include "build/build_config.h" 12 #include "build/build_config.h"
12 #include "components/mus/public/cpp/input_event_handler.h" 13 #include "components/mus/public/cpp/input_event_handler.h"
13 #include "components/mus/public/cpp/scoped_window_ptr.h" 14 #include "components/mus/public/cpp/scoped_window_ptr.h"
14 #include "components/mus/public/cpp/window.h" 15 #include "components/mus/public/cpp/window.h"
15 #include "content/browser/renderer_host/render_widget_host_view_base.h" 16 #include "content/browser/renderer_host/render_widget_host_view_base.h"
16 #include "content/public/browser/render_process_host_observer.h" 17 #include "content/public/browser/render_process_host_observer.h"
17 18
18 namespace content { 19 namespace content {
19 20
20 class RenderWidgetHost; 21 class RenderWidgetHost;
(...skipping 17 matching lines...) Expand all
38 RenderWidgetHostViewMus(mus::Window* parent_window, 39 RenderWidgetHostViewMus(mus::Window* parent_window,
39 RenderWidgetHostImpl* widget); 40 RenderWidgetHostImpl* widget);
40 ~RenderWidgetHostViewMus() override; 41 ~RenderWidgetHostViewMus() override;
41 42
42 private: 43 private:
43 // Set the bounds of the window and handle size changes. Assumes the caller 44 // Set the bounds of the window and handle size changes. Assumes the caller
44 // has already adjusted the origin of |rect| to conform to whatever coordinate 45 // has already adjusted the origin of |rect| to conform to whatever coordinate
45 // space is required by the aura::Window. 46 // space is required by the aura::Window.
46 void InternalSetBounds(const gfx::Rect& rect); 47 void InternalSetBounds(const gfx::Rect& rect);
47 48
49 void OnEmbed(bool success,
50 mus::mojom::InputEventHandlerPtr event_handler);
51
48 // RenderWidgetHostView implementation. 52 // RenderWidgetHostView implementation.
49 void InitAsChild(gfx::NativeView parent_view) override; 53 void InitAsChild(gfx::NativeView parent_view) override;
50 RenderWidgetHost* GetRenderWidgetHost() const override; 54 RenderWidgetHost* GetRenderWidgetHost() const override;
51 void SetSize(const gfx::Size& size) override; 55 void SetSize(const gfx::Size& size) override;
52 void SetBounds(const gfx::Rect& rect) override; 56 void SetBounds(const gfx::Rect& rect) override;
53 void Focus() override; 57 void Focus() override;
54 bool HasFocus() const override; 58 bool HasFocus() const override;
55 bool IsSurfaceAvailableForCopy() const override; 59 bool IsSurfaceAvailableForCopy() const override;
56 void Show() override; 60 void Show() override;
57 void Hide() override; 61 void Hide() override;
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 mus::Window* target, 127 mus::Window* target,
124 const ui::Event& event, 128 const ui::Event& event,
125 std::unique_ptr<base::Callback<void(mus::mojom::EventResult)>>* 129 std::unique_ptr<base::Callback<void(mus::mojom::EventResult)>>*
126 ack_callback) override; 130 ack_callback) override;
127 131
128 RenderWidgetHostImpl* host_; 132 RenderWidgetHostImpl* host_;
129 133
130 aura::Window* aura_window_; 134 aura::Window* aura_window_;
131 135
132 std::unique_ptr<mus::ScopedWindowPtr> mus_window_; 136 std::unique_ptr<mus::ScopedWindowPtr> mus_window_;
137 mus::mojom::InputEventHandlerPtr event_handler_;
133 138
139 base::WeakPtrFactory<RenderWidgetHostViewMus> weak_factory_;
134 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewMus); 140 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewMus);
135 }; 141 };
136 142
137 } // namespace content 143 } // namespace content
138 144
139 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MUS_H_ 145 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MUS_H_
OLDNEW
« no previous file with comments | « content/browser/gpu/gpu_data_manager_impl_private.cc ('k') | content/browser/renderer_host/render_widget_host_view_mus.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698