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

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

Issue 2774373002: Use MojoCompositorFrameSink in RendererCompositorFrameSink (Closed)
Patch Set: Rebased, dedup IPC Created 3 years, 8 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_BASE_H_ 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_BASE_H_
6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_BASE_H_ 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_BASE_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
11 #include <memory> 11 #include <memory>
12 #include <string> 12 #include <string>
13 #include <vector> 13 #include <vector>
14 14
15 #include "base/callback_forward.h" 15 #include "base/callback_forward.h"
16 #include "base/macros.h" 16 #include "base/macros.h"
17 #include "base/observer_list.h" 17 #include "base/observer_list.h"
18 #include "base/process/kill.h" 18 #include "base/process/kill.h"
19 #include "base/strings/string16.h" 19 #include "base/strings/string16.h"
20 #include "base/timer/timer.h" 20 #include "base/timer/timer.h"
21 #include "build/build_config.h" 21 #include "build/build_config.h"
22 #include "cc/ipc/mojo_compositor_frame_sink.mojom.h"
22 #include "cc/output/compositor_frame.h" 23 #include "cc/output/compositor_frame.h"
23 #include "cc/surfaces/surface_id.h" 24 #include "cc/surfaces/surface_id.h"
24 #include "content/browser/renderer_host/event_with_latency_info.h" 25 #include "content/browser/renderer_host/event_with_latency_info.h"
25 #include "content/common/content_export.h" 26 #include "content/common/content_export.h"
26 #include "content/common/input/input_event_ack_state.h" 27 #include "content/common/input/input_event_ack_state.h"
27 #include "content/public/browser/render_widget_host_view.h" 28 #include "content/public/browser/render_widget_host_view.h"
28 #include "content/public/common/screen_info.h" 29 #include "content/public/common/screen_info.h"
29 #include "ipc/ipc_listener.h" 30 #include "ipc/ipc_listener.h"
30 #include "third_party/WebKit/public/platform/modules/screen_orientation/WebScree nOrientationType.h" 31 #include "third_party/WebKit/public/platform/modules/screen_orientation/WebScree nOrientationType.h"
31 #include "third_party/WebKit/public/web/WebPopupType.h" 32 #include "third_party/WebKit/public/web/WebPopupType.h"
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 virtual gfx::NativeViewAccessible AccessibilityGetNativeViewAccessible(); 216 virtual gfx::NativeViewAccessible AccessibilityGetNativeViewAccessible();
216 virtual void SetMainFrameAXTreeID(ui::AXTreeIDRegistry::AXTreeID id) {} 217 virtual void SetMainFrameAXTreeID(ui::AXTreeIDRegistry::AXTreeID id) {}
217 // Informs that the focused DOM node has changed. 218 // Informs that the focused DOM node has changed.
218 virtual void FocusedNodeChanged(bool is_editable_node, 219 virtual void FocusedNodeChanged(bool is_editable_node,
219 const gfx::Rect& node_bounds_in_screen) {} 220 const gfx::Rect& node_bounds_in_screen) {}
220 221
221 // This method is called by RenderWidgetHostImpl when a new 222 // This method is called by RenderWidgetHostImpl when a new
222 // RendererCompositorFrameSink is created in the renderer. The view is 223 // RendererCompositorFrameSink is created in the renderer. The view is
223 // expected not to return resources belonging to the old 224 // expected not to return resources belonging to the old
224 // RendererCompositorFrameSink after this method finishes. 225 // RendererCompositorFrameSink after this method finishes.
225 virtual void DidCreateNewRendererCompositorFrameSink() = 0; 226 virtual void DidCreateNewRendererCompositorFrameSink(
227 cc::mojom::MojoCompositorFrameSinkClient*
228 renderer_compositor_frame_sink) = 0;
226 229
227 virtual void SubmitCompositorFrame(const cc::LocalSurfaceId& local_surface_id, 230 virtual void SubmitCompositorFrame(const cc::LocalSurfaceId& local_surface_id,
228 cc::CompositorFrame frame) = 0; 231 cc::CompositorFrame frame) = 0;
229 232
230 virtual void OnBeginFrameDidNotSwap(const cc::BeginFrameAck& ack) {} 233 virtual void OnBeginFrameDidNotSwap(const cc::BeginFrameAck& ack) {}
231 virtual void OnSurfaceChanged(const cc::SurfaceInfo& surface_info) {} 234 virtual void OnSurfaceChanged(const cc::SurfaceInfo& surface_info) {}
232 235
233 // This method exists to allow removing of displayed graphics, after a new 236 // This method exists to allow removing of displayed graphics, after a new
234 // page has been loaded, to prevent the displayed URL from being out of sync 237 // page has been loaded, to prevent the displayed URL from being out of sync
235 // with what is visible on screen. 238 // with what is visible on screen.
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
463 base::ObserverList<RenderWidgetHostViewBaseObserver> observers_; 466 base::ObserverList<RenderWidgetHostViewBaseObserver> observers_;
464 467
465 base::WeakPtrFactory<RenderWidgetHostViewBase> weak_factory_; 468 base::WeakPtrFactory<RenderWidgetHostViewBase> weak_factory_;
466 469
467 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewBase); 470 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewBase);
468 }; 471 };
469 472
470 } // namespace content 473 } // namespace content
471 474
472 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_BASE_H_ 475 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_BASE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698