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

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

Issue 2774373002: Use MojoCompositorFrameSink in RendererCompositorFrameSink (Closed)
Patch Set: Survive renderer crash 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 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
214 virtual gfx::NativeViewAccessible AccessibilityGetNativeViewAccessible(); 215 virtual gfx::NativeViewAccessible AccessibilityGetNativeViewAccessible();
215 virtual void SetMainFrameAXTreeID(ui::AXTreeIDRegistry::AXTreeID id) {} 216 virtual void SetMainFrameAXTreeID(ui::AXTreeIDRegistry::AXTreeID id) {}
216 // Informs that the focused DOM node has changed. 217 // Informs that the focused DOM node has changed.
217 virtual void FocusedNodeChanged(bool is_editable_node, 218 virtual void FocusedNodeChanged(bool is_editable_node,
218 const gfx::Rect& node_bounds_in_screen) {} 219 const gfx::Rect& node_bounds_in_screen) {}
219 220
220 // This method is called by RenderWidgetHostImpl when a new 221 // This method is called by RenderWidgetHostImpl when a new
221 // RendererCompositorFrameSink is created in the renderer. The view is 222 // RendererCompositorFrameSink is created in the renderer. The view is
222 // expected not to return resources belonging to the old 223 // expected not to return resources belonging to the old
223 // RendererCompositorFrameSink after this method finishes. 224 // RendererCompositorFrameSink after this method finishes.
224 virtual void DidCreateNewRendererCompositorFrameSink() = 0; 225 virtual void DidCreateNewRendererCompositorFrameSink(
226 cc::mojom::MojoCompositorFrameSinkClient*
227 renderer_compositor_frame_sink) = 0;
225 228
226 virtual void SubmitCompositorFrame(const cc::LocalSurfaceId& local_surface_id, 229 virtual void SubmitCompositorFrame(const cc::LocalSurfaceId& local_surface_id,
227 cc::CompositorFrame frame) = 0; 230 cc::CompositorFrame frame) = 0;
228 231
229 virtual void OnBeginFrameDidNotSwap(const cc::BeginFrameAck& ack) {} 232 virtual void OnBeginFrameDidNotSwap(const cc::BeginFrameAck& ack) {}
230 233
231 // This method exists to allow removing of displayed graphics, after a new 234 // This method exists to allow removing of displayed graphics, after a new
232 // page has been loaded, to prevent the displayed URL from being out of sync 235 // page has been loaded, to prevent the displayed URL from being out of sync
233 // with what is visible on screen. 236 // with what is visible on screen.
234 virtual void ClearCompositorFrame() = 0; 237 virtual void ClearCompositorFrame() = 0;
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after
461 base::ObserverList<RenderWidgetHostViewBaseObserver> observers_; 464 base::ObserverList<RenderWidgetHostViewBaseObserver> observers_;
462 465
463 base::WeakPtrFactory<RenderWidgetHostViewBase> weak_factory_; 466 base::WeakPtrFactory<RenderWidgetHostViewBase> weak_factory_;
464 467
465 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewBase); 468 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewBase);
466 }; 469 };
467 470
468 } // namespace content 471 } // namespace content
469 472
470 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_BASE_H_ 473 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_BASE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698