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

Side by Side Diff: content/browser/frame_host/render_widget_host_view_child_frame.cc

Issue 100473010: Adding RenderWidgetHostViewChildFrame for OOPIF view. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: add missing files and reorder struct Created 7 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 | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "content/browser/frame_host/render_widget_host_view_child_frame.h"
6
7 #include "content/browser/frame_host/cross_process_frame_connector.h"
8 #include "content/browser/renderer_host/render_widget_host_impl.h"
9 #include "content/common/gpu/gpu_messages.h"
10 #include "content/common/view_messages.h"
11 #include "content/public/browser/render_process_host.h"
12
13 namespace content {
14
15 RenderWidgetHostViewChildFrame::RenderWidgetHostViewChildFrame(
16 RenderWidgetHost* widget_host)
17 : host_(RenderWidgetHostImpl::From(widget_host)),
18 frame_connector_(NULL) {
19 host_->SetView(this);
20 }
21
22 RenderWidgetHostViewChildFrame::~RenderWidgetHostViewChildFrame() {
23 }
24
25 void RenderWidgetHostViewChildFrame::InitAsChild(
26 gfx::NativeView parent_view) {
27 NOTREACHED();
28 }
29
30 RenderWidgetHost* RenderWidgetHostViewChildFrame::GetRenderWidgetHost() const {
31 return host_;
32 }
33
34 void RenderWidgetHostViewChildFrame::SetSize(const gfx::Size& size) {
35 size_ = size;
36 host_->WasResized();
37 }
38
39 void RenderWidgetHostViewChildFrame::SetBounds(const gfx::Rect& rect) {
40 SetSize(rect.size());
41 }
42
43 void RenderWidgetHostViewChildFrame::Focus() {
44 }
45
46 bool RenderWidgetHostViewChildFrame::HasFocus() const {
47 return false;
48 }
49
50 bool RenderWidgetHostViewChildFrame::IsSurfaceAvailableForCopy() const {
51 NOTIMPLEMENTED();
52 return false;
53 }
54
55 void RenderWidgetHostViewChildFrame::Show() {
56 WasShown();
57 }
58
59 void RenderWidgetHostViewChildFrame::Hide() {
60 WasHidden();
61 }
62
63 bool RenderWidgetHostViewChildFrame::IsShowing() {
64 return !host_->is_hidden();
65 }
66
67 gfx::Rect RenderWidgetHostViewChildFrame::GetViewBounds() const {
68 gfx::Rect rect;
69 if (frame_connector_)
70 rect = frame_connector_->ChildFrameRect();
71 rect.set_width(size_.width());
72 rect.set_height(size_.height());
73 return rect;
74 }
75
76 gfx::NativeView RenderWidgetHostViewChildFrame::GetNativeView() const {
77 NOTREACHED();
78 return NULL;
79 }
80
81 gfx::NativeViewId RenderWidgetHostViewChildFrame::GetNativeViewId() const {
82 NOTREACHED();
83 return 0;
84 }
85
86 gfx::NativeViewAccessible
87 RenderWidgetHostViewChildFrame::GetNativeViewAccessible() {
88 NOTREACHED();
89 return NULL;
90 }
91
92 void RenderWidgetHostViewChildFrame::SetBackground(
93 const SkBitmap& background) {
94 }
95
96 gfx::Size RenderWidgetHostViewChildFrame::GetPhysicalBackingSize() const {
97 return size_;
98 }
99
100 void RenderWidgetHostViewChildFrame::InitAsPopup(
101 RenderWidgetHostView* parent_host_view,
102 const gfx::Rect& pos) {
103 NOTREACHED();
104 }
105
106 void RenderWidgetHostViewChildFrame::InitAsFullscreen(
107 RenderWidgetHostView* reference_host_view) {
108 NOTREACHED();
109 }
110
111 void RenderWidgetHostViewChildFrame::ImeCancelComposition() {
112 NOTREACHED();
113 }
114
115 #if defined(OS_MACOSX) || defined(OS_WIN) || defined(USE_AURA)
116 void RenderWidgetHostViewChildFrame::ImeCompositionRangeChanged(
117 const gfx::Range& range,
118 const std::vector<gfx::Rect>& character_bounds) {
119 NOTREACHED();
120 }
121 #endif
122
123 void RenderWidgetHostViewChildFrame::DidUpdateBackingStore(
124 const gfx::Rect& scroll_rect,
125 const gfx::Vector2d& scroll_delta,
126 const std::vector<gfx::Rect>& copy_rects,
127 const ui::LatencyInfo& latency_info) {
128 NOTREACHED();
129 }
130
131 void RenderWidgetHostViewChildFrame::WasShown() {
132 if (!host_->is_hidden())
133 return;
134 host_->WasShown();
135 }
136
137 void RenderWidgetHostViewChildFrame::WasHidden() {
138 if (host_->is_hidden())
139 return;
140 host_->WasHidden();
141 }
142
143 void RenderWidgetHostViewChildFrame::MovePluginWindows(
144 const gfx::Vector2d& scroll_offset,
145 const std::vector<WebPluginGeometry>& moves) {
146 }
147
148 void RenderWidgetHostViewChildFrame::Blur() {
149 }
150
151 void RenderWidgetHostViewChildFrame::UpdateCursor(const WebCursor& cursor) {
152 }
153
154 void RenderWidgetHostViewChildFrame::SetIsLoading(bool is_loading) {
155 NOTREACHED();
156 }
157
158 void RenderWidgetHostViewChildFrame::TextInputTypeChanged(
159 ui::TextInputType type,
160 ui::TextInputMode input_mode,
161 bool can_compose_inline) {
162 NOTREACHED();
163 }
164
165 void RenderWidgetHostViewChildFrame::RenderProcessGone(
166 base::TerminationStatus status,
167 int error_code) {
168 }
169
170 void RenderWidgetHostViewChildFrame::Destroy() {
171 // TODO(ajwong): Why did Ken destroy the |frame_connector_| here?
172 frame_connector_ = NULL;
173
174 host_->SetView(NULL);
175 host_ = NULL;
176 base::MessageLoop::current()->DeleteSoon(FROM_HERE, this);
177 }
178
179 void RenderWidgetHostViewChildFrame::SetTooltipText(
180 const string16& tooltip_text) {
181 }
182
183 void RenderWidgetHostViewChildFrame::SelectionChanged(
184 const string16& text,
185 size_t offset,
186 const gfx::Range& range) {
187 }
188
189 void RenderWidgetHostViewChildFrame::SelectionBoundsChanged(
190 const ViewHostMsg_SelectionBounds_Params& params) {
191 }
192
193 void RenderWidgetHostViewChildFrame::ScrollOffsetChanged() {
194 }
195
196 void RenderWidgetHostViewChildFrame::OnAcceleratedCompositingStateChange() {
197 }
198
199 void RenderWidgetHostViewChildFrame::AcceleratedSurfaceInitialized(int host_id,
200 int route_id) {
201 }
202
203 void RenderWidgetHostViewChildFrame::AcceleratedSurfaceBuffersSwapped(
204 const GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params& params,
205 int gpu_host_id) {
206 if (frame_connector_)
207 frame_connector_->ChildFrameBuffersSwapped(params, gpu_host_id);
208 }
209
210 void RenderWidgetHostViewChildFrame::AcceleratedSurfacePostSubBuffer(
211 const GpuHostMsg_AcceleratedSurfacePostSubBuffer_Params& params,
212 int gpu_host_id) {
213 }
214
215 void RenderWidgetHostViewChildFrame::OnSwapCompositorFrame(
216 uint32 output_surface_id,
217 scoped_ptr<cc::CompositorFrame> frame) {
218 if (frame_connector_)
219 frame_connector_->ChildFrameCompositorFrameSwapped(
220 output_surface_id, frame.Pass());
221 }
222
223 void RenderWidgetHostViewChildFrame::GetScreenInfo(
224 blink::WebScreenInfo* results) {
225 }
226
227 gfx::Rect RenderWidgetHostViewChildFrame::GetBoundsInRootWindow() {
228 // We do not have any root window specific parts in this view.
229 return GetViewBounds();
230 }
231
232 #if defined(OS_WIN) || defined(USE_AURA)
233 void RenderWidgetHostViewChildFrame::ProcessAckedTouchEvent(
234 const TouchEventWithLatencyInfo& touch,
235 InputEventAckState ack_result) {
236 }
237 #endif // defined(OS_WIN) || defined(USE_AURA)
238
239 bool RenderWidgetHostViewChildFrame::LockMouse() {
240 return false;
241 }
242
243 void RenderWidgetHostViewChildFrame::UnlockMouse() {
244 }
245
246 void RenderWidgetHostViewChildFrame::OnAccessibilityEvents(
247 const std::vector<AccessibilityHostMsg_EventParams>& params) {
248 }
249
250 #if defined(OS_MACOSX)
251 void RenderWidgetHostViewChildFrame::SetActive(bool active) {
252 }
253
254 void RenderWidgetHostViewChildFrame::SetTakesFocusOnlyOnMouseDown(bool flag) {
255 }
256
257 void RenderWidgetHostViewChildFrame::SetWindowVisibility(bool visible) {
258 }
259
260 void RenderWidgetHostViewChildFrame::WindowFrameChanged() {
261 }
262
263 void RenderWidgetHostViewChildFrame::ShowDefinitionForSelection() {
264 }
265
266 void RenderWidgetHostViewChildFrame::AboutToWaitForBackingStoreMsg() {
267 }
268
269 bool RenderWidgetHostViewChildFrame::SupportsSpeech() const {
270 return false;
271 }
272
273 void RenderWidgetHostViewChildFrame::SpeakSelection() {
274 }
275
276 bool RenderWidgetHostViewChildFrame::IsSpeaking() const {
277 return false;
278 }
279
280 void RenderWidgetHostViewChildFrame::StopSpeaking() {
281 }
282
283 bool RenderWidgetHostViewChildFrame::PostProcessEventForPluginIme(
284 const NativeWebKeyboardEvent& event) {
285 return false;
286 }
287 #endif // defined(OS_MACOSX)
288
289 #if defined(OS_ANDROID)
290 void RenderWidgetHostViewChildFrame::ShowDisambiguationPopup(
291 const gfx::Rect& target_rect,
292 const SkBitmap& zoomed_bitmap) {
293 }
294
295 void RenderWidgetHostViewChildFrame::HasTouchEventHandlers(
296 bool need_touch_events) {
297 }
298 #endif // defined(OS_ANDROID)
299
300 #if defined(TOOLKIT_GTK)
301 GdkEventButton* RenderWidgetHostViewChildFrame::GetLastMouseDown() {
302 return NULL;
303 }
304
305 gfx::NativeView RenderWidgetHostViewChildFrame::BuildInputMethodsGtkMenu() {
306 return NULL;
307 }
308 #endif // defined(TOOLKIT_GTK)
309
310 #if defined(OS_WIN) && !defined(USE_AURA)
311 void RenderWidgetHostViewChildFrame::WillWmDestroy() {
312 }
313 #endif // defined(OS_WIN) && !defined(USE_AURA)
314
315 BackingStore* RenderWidgetHostViewChildFrame::AllocBackingStore(
316 const gfx::Size& size) {
317 NOTREACHED();
318 return NULL;
319 }
320
321 void RenderWidgetHostViewChildFrame::CopyFromCompositingSurface(
322 const gfx::Rect& src_subrect,
323 const gfx::Size& /* dst_size */,
324 const base::Callback<void(bool, const SkBitmap&)>& callback) {
325 callback.Run(false, SkBitmap());
326 }
327
328 void RenderWidgetHostViewChildFrame::CopyFromCompositingSurfaceToVideoFrame(
329 const gfx::Rect& src_subrect,
330 const scoped_refptr<media::VideoFrame>& target,
331 const base::Callback<void(bool)>& callback) {
332 NOTIMPLEMENTED();
333 callback.Run(false);
334 }
335
336 bool RenderWidgetHostViewChildFrame::CanCopyToVideoFrame() const {
337 return false;
338 }
339
340 void RenderWidgetHostViewChildFrame::AcceleratedSurfaceSuspend() {
341 NOTREACHED();
342 }
343
344 void RenderWidgetHostViewChildFrame::AcceleratedSurfaceRelease() {
345 }
346
347 bool RenderWidgetHostViewChildFrame::HasAcceleratedSurface(
348 const gfx::Size& desired_size) {
349 return false;
350 }
351
352 #if defined(OS_WIN) && !defined(USE_AURA)
353 void RenderWidgetHostViewChildFrame::SetClickthroughRegion(SkRegion* region) {
354 }
355 #endif // defined(OS_WIN) && !defined(USE_AURA)
356
357 gfx::GLSurfaceHandle RenderWidgetHostViewChildFrame::GetCompositingSurface() {
358 return gfx::GLSurfaceHandle(gfx::kNullPluginWindow, gfx::TEXTURE_TRANSPORT);
359 }
360
361 void RenderWidgetHostViewChildFrame::SetHasHorizontalScrollbar(
362 bool has_horizontal_scrollbar) {
363 }
364
365 void RenderWidgetHostViewChildFrame::SetScrollOffsetPinning(
366 bool is_pinned_to_left, bool is_pinned_to_right) {
367 }
368
369 #if defined(OS_WIN) && defined(USE_AURA)
370 void RenderWidgetHostViewChildFrame::SetParentNativeViewAccessible(
371 gfx::NativeViewAccessible accessible_parent) {
372 }
373
374 gfx::NativeViewId RenderWidgetHostViewChildFrame::GetParentForWindowlessPlugin()
375 const {
376 return NULL;
377 }
378 #endif // defined(OS_WIN) && defined(USE_AURA)
379
380 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698