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

Side by Side Diff: content/test/test_render_view_host.h

Issue 2780713004: Hide compositor_frame_sink_id from RenderWidgetHostView* (Closed)
Patch Set: Added a comment in android 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_TEST_TEST_RENDER_VIEW_HOST_H_ 5 #ifndef CONTENT_TEST_TEST_RENDER_VIEW_HOST_H_
6 #define CONTENT_TEST_TEST_RENDER_VIEW_HOST_H_ 6 #define CONTENT_TEST_TEST_RENDER_VIEW_HOST_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <string> 10 #include <string>
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 gfx::Rect GetViewBounds() const override; 79 gfx::Rect GetViewBounds() const override;
80 #if defined(OS_MACOSX) 80 #if defined(OS_MACOSX)
81 ui::AcceleratedWidgetMac* GetAcceleratedWidgetMac() const override; 81 ui::AcceleratedWidgetMac* GetAcceleratedWidgetMac() const override;
82 void SetActive(bool active) override; 82 void SetActive(bool active) override;
83 void ShowDefinitionForSelection() override {} 83 void ShowDefinitionForSelection() override {}
84 bool SupportsSpeech() const override; 84 bool SupportsSpeech() const override;
85 void SpeakSelection() override; 85 void SpeakSelection() override;
86 bool IsSpeaking() const override; 86 bool IsSpeaking() const override;
87 void StopSpeaking() override; 87 void StopSpeaking() override;
88 #endif // defined(OS_MACOSX) 88 #endif // defined(OS_MACOSX)
89 void OnSwapCompositorFrame(uint32_t compositor_frame_sink_id, 89 void DidCreateNewRendererCompositorFrameSink() override;
90 const cc::LocalSurfaceId& local_surface_id, 90 void SubmitCompositorFrame(const cc::LocalSurfaceId& local_surface_id,
91 cc::CompositorFrame frame) override; 91 cc::CompositorFrame frame) override;
92 void ClearCompositorFrame() override {} 92 void ClearCompositorFrame() override {}
93 void SetNeedsBeginFrames(bool needs_begin_frames) override {} 93 void SetNeedsBeginFrames(bool needs_begin_frames) override {}
94 94
95 // RenderWidgetHostViewBase implementation. 95 // RenderWidgetHostViewBase implementation.
96 void InitAsPopup(RenderWidgetHostView* parent_host_view, 96 void InitAsPopup(RenderWidgetHostView* parent_host_view,
97 const gfx::Rect& bounds) override {} 97 const gfx::Rect& bounds) override {}
98 void InitAsFullscreen(RenderWidgetHostView* reference_host_view) override {} 98 void InitAsFullscreen(RenderWidgetHostView* reference_host_view) override {}
99 void Focus() override {} 99 void Focus() override {}
100 void SetIsLoading(bool is_loading) override {} 100 void SetIsLoading(bool is_loading) override {}
101 void UpdateCursor(const WebCursor& cursor) override {} 101 void UpdateCursor(const WebCursor& cursor) override {}
102 void RenderProcessGone(base::TerminationStatus status, 102 void RenderProcessGone(base::TerminationStatus status,
103 int error_code) override; 103 int error_code) override;
104 void Destroy() override; 104 void Destroy() override;
105 void SetTooltipText(const base::string16& tooltip_text) override {} 105 void SetTooltipText(const base::string16& tooltip_text) override {}
106 bool HasAcceleratedSurface(const gfx::Size& desired_size) override; 106 bool HasAcceleratedSurface(const gfx::Size& desired_size) override;
107 gfx::Rect GetBoundsInRootWindow() override; 107 gfx::Rect GetBoundsInRootWindow() override;
108 bool LockMouse() override; 108 bool LockMouse() override;
109 void UnlockMouse() override; 109 void UnlockMouse() override;
110 cc::FrameSinkId GetFrameSinkId() override; 110 cc::FrameSinkId GetFrameSinkId() override;
111 111
112 bool is_showing() const { return is_showing_; } 112 bool is_showing() const { return is_showing_; }
113 bool is_occluded() const { return is_occluded_; } 113 bool is_occluded() const { return is_occluded_; }
114 bool did_swap_compositor_frame() const { return did_swap_compositor_frame_; } 114 bool did_swap_compositor_frame() const { return did_swap_compositor_frame_; }
115 void reset_did_swap_compositor_frame() { did_swap_compositor_frame_ = false; } 115 void reset_did_swap_compositor_frame() { did_swap_compositor_frame_ = false; }
116 bool did_change_compositor_frame_sink() {
117 return did_change_compositor_frame_sink_;
118 }
119 void reset_did_change_compositor_frame_sink() {
120 did_change_compositor_frame_sink_ = false;
121 }
116 122
117 protected: 123 protected:
118 RenderWidgetHostImpl* rwh_; 124 RenderWidgetHostImpl* rwh_;
119 cc::FrameSinkId frame_sink_id_; 125 cc::FrameSinkId frame_sink_id_;
120 126
121 private: 127 private:
122 bool is_showing_; 128 bool is_showing_;
123 bool is_occluded_; 129 bool is_occluded_;
124 bool did_swap_compositor_frame_; 130 bool did_swap_compositor_frame_;
131 bool did_change_compositor_frame_sink_ = false;
125 ui::DummyTextInputClient text_input_client_; 132 ui::DummyTextInputClient text_input_client_;
126 }; 133 };
127 134
128 #if defined(COMPILER_MSVC) 135 #if defined(COMPILER_MSVC)
129 // See comment for same warning on RenderViewHostImpl. 136 // See comment for same warning on RenderViewHostImpl.
130 #pragma warning(push) 137 #pragma warning(push)
131 #pragma warning(disable: 4250) 138 #pragma warning(disable: 4250)
132 #endif 139 #endif
133 140
134 // TestRenderViewHost ---------------------------------------------------------- 141 // TestRenderViewHost ----------------------------------------------------------
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
293 private: 300 private:
294 typedef std::unique_ptr<ui::test::ScopedSetSupportedScaleFactors> 301 typedef std::unique_ptr<ui::test::ScopedSetSupportedScaleFactors>
295 ScopedSetSupportedScaleFactors; 302 ScopedSetSupportedScaleFactors;
296 ScopedSetSupportedScaleFactors scoped_set_supported_scale_factors_; 303 ScopedSetSupportedScaleFactors scoped_set_supported_scale_factors_;
297 DISALLOW_COPY_AND_ASSIGN(RenderViewHostImplTestHarness); 304 DISALLOW_COPY_AND_ASSIGN(RenderViewHostImplTestHarness);
298 }; 305 };
299 306
300 } // namespace content 307 } // namespace content
301 308
302 #endif // CONTENT_TEST_TEST_RENDER_VIEW_HOST_H_ 309 #endif // CONTENT_TEST_TEST_RENDER_VIEW_HOST_H_
OLDNEW
« no previous file with comments | « content/browser/renderer_host/render_widget_host_view_mac.mm ('k') | content/test/test_render_view_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698