OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #include "content/browser/frame_host/render_widget_host_view_child_frame.h" | 5 #include "content/browser/frame_host/render_widget_host_view_child_frame.h" |
6 | 6 |
| 7 #include "base/command_line.h" |
7 #include "cc/surfaces/surface.h" | 8 #include "cc/surfaces/surface.h" |
8 #include "cc/surfaces/surface_factory.h" | 9 #include "cc/surfaces/surface_factory.h" |
9 #include "cc/surfaces/surface_manager.h" | 10 #include "cc/surfaces/surface_manager.h" |
10 #include "cc/surfaces/surface_sequence.h" | 11 #include "cc/surfaces/surface_sequence.h" |
11 #include "content/browser/accessibility/browser_accessibility_manager.h" | 12 #include "content/browser/accessibility/browser_accessibility_manager.h" |
| 13 #include "content/browser/browser_plugin/browser_plugin_guest.h" |
12 #include "content/browser/compositor/surface_utils.h" | 14 #include "content/browser/compositor/surface_utils.h" |
13 #include "content/browser/frame_host/cross_process_frame_connector.h" | 15 #include "content/browser/frame_host/cross_process_frame_connector.h" |
14 #include "content/browser/gpu/compositor_util.h" | 16 #include "content/browser/gpu/compositor_util.h" |
| 17 #include "content/browser/renderer_host/render_view_host_impl.h" |
15 #include "content/browser/renderer_host/render_widget_host_impl.h" | 18 #include "content/browser/renderer_host/render_widget_host_impl.h" |
16 #include "content/common/gpu/gpu_messages.h" | 19 #include "content/common/gpu/gpu_messages.h" |
17 #include "content/common/view_messages.h" | 20 #include "content/common/view_messages.h" |
18 #include "content/public/browser/render_process_host.h" | 21 #include "content/public/browser/render_process_host.h" |
| 22 #include "content/public/common/content_switches.h" |
19 | 23 |
20 namespace content { | 24 namespace content { |
21 | 25 |
22 RenderWidgetHostViewChildFrame::RenderWidgetHostViewChildFrame( | 26 RenderWidgetHostViewChildFrame::RenderWidgetHostViewChildFrame( |
23 RenderWidgetHost* widget_host) | 27 RenderWidgetHost* widget_host) |
24 : host_(RenderWidgetHostImpl::From(widget_host)), | 28 : host_(RenderWidgetHostImpl::From(widget_host)), |
25 use_surfaces_(UseSurfacesEnabled()), | 29 use_surfaces_(UseSurfacesEnabled()), |
26 next_surface_sequence_(1u), | 30 next_surface_sequence_(1u), |
27 last_output_surface_id_(0), | 31 last_output_surface_id_(0), |
28 current_surface_scale_factor_(1.f), | 32 current_surface_scale_factor_(1.f), |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
144 } | 148 } |
145 | 149 |
146 void RenderWidgetHostViewChildFrame::MovePluginWindows( | 150 void RenderWidgetHostViewChildFrame::MovePluginWindows( |
147 const std::vector<WebPluginGeometry>& moves) { | 151 const std::vector<WebPluginGeometry>& moves) { |
148 } | 152 } |
149 | 153 |
150 void RenderWidgetHostViewChildFrame::UpdateCursor(const WebCursor& cursor) { | 154 void RenderWidgetHostViewChildFrame::UpdateCursor(const WebCursor& cursor) { |
151 } | 155 } |
152 | 156 |
153 void RenderWidgetHostViewChildFrame::SetIsLoading(bool is_loading) { | 157 void RenderWidgetHostViewChildFrame::SetIsLoading(bool is_loading) { |
| 158 // It is valid for an inner WebContents's SetIsLoading() to end up here. |
| 159 // This is because an inner WebContents's main frame's RenderWidgetHostView |
| 160 // is a RenderWidgetHostViewChildFrame. In contrast, when there is no |
| 161 // inner/outer WebContents, only subframe's RenderWidgetHostView can be a |
| 162 // RenderWidgetHostViewChildFrame which do not get a SetIsLoading() call. |
| 163 if (base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 164 switches::kSitePerProcess) && |
| 165 BrowserPluginGuest::IsGuest( |
| 166 static_cast<RenderViewHostImpl*>(RenderViewHost::From(host_)))) { |
| 167 return; |
| 168 } |
| 169 |
154 NOTREACHED(); | 170 NOTREACHED(); |
155 } | 171 } |
156 | 172 |
157 void RenderWidgetHostViewChildFrame::TextInputTypeChanged( | 173 void RenderWidgetHostViewChildFrame::TextInputTypeChanged( |
158 ui::TextInputType type, | 174 ui::TextInputType type, |
159 ui::TextInputMode input_mode, | 175 ui::TextInputMode input_mode, |
160 bool can_compose_inline, | 176 bool can_compose_inline, |
161 int flags) { | 177 int flags) { |
162 // TODO(kenrb): Implement. | 178 // TODO(kenrb): Implement. |
163 } | 179 } |
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
412 } | 428 } |
413 | 429 |
414 BrowserAccessibilityManager* | 430 BrowserAccessibilityManager* |
415 RenderWidgetHostViewChildFrame::CreateBrowserAccessibilityManager( | 431 RenderWidgetHostViewChildFrame::CreateBrowserAccessibilityManager( |
416 BrowserAccessibilityDelegate* delegate) { | 432 BrowserAccessibilityDelegate* delegate) { |
417 return BrowserAccessibilityManager::Create( | 433 return BrowserAccessibilityManager::Create( |
418 BrowserAccessibilityManager::GetEmptyDocument(), delegate); | 434 BrowserAccessibilityManager::GetEmptyDocument(), delegate); |
419 } | 435 } |
420 | 436 |
421 } // namespace content | 437 } // namespace content |
OLD | NEW |