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 "content/browser/accessibility/browser_accessibility_manager.h" | 8 #include "content/browser/accessibility/browser_accessibility_manager.h" |
9 #include "content/browser/browser_plugin/browser_plugin_guest.h" | |
8 #include "content/browser/frame_host/cross_process_frame_connector.h" | 10 #include "content/browser/frame_host/cross_process_frame_connector.h" |
11 #include "content/browser/renderer_host/render_view_host_impl.h" | |
9 #include "content/browser/renderer_host/render_widget_host_impl.h" | 12 #include "content/browser/renderer_host/render_widget_host_impl.h" |
10 #include "content/common/gpu/gpu_messages.h" | 13 #include "content/common/gpu/gpu_messages.h" |
11 #include "content/common/view_messages.h" | 14 #include "content/common/view_messages.h" |
12 #include "content/public/browser/render_process_host.h" | 15 #include "content/public/browser/render_process_host.h" |
16 #include "content/public/common/content_switches.h" | |
13 | 17 |
14 namespace content { | 18 namespace content { |
15 | 19 |
16 RenderWidgetHostViewChildFrame::RenderWidgetHostViewChildFrame( | 20 RenderWidgetHostViewChildFrame::RenderWidgetHostViewChildFrame( |
17 RenderWidgetHost* widget_host) | 21 RenderWidgetHost* widget_host) |
18 : host_(RenderWidgetHostImpl::From(widget_host)), | 22 : host_(RenderWidgetHostImpl::From(widget_host)), |
19 frame_connector_(NULL) { | 23 frame_connector_(NULL) { |
20 host_->SetView(this); | 24 host_->SetView(this); |
21 } | 25 } |
22 | 26 |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
127 } | 131 } |
128 | 132 |
129 void RenderWidgetHostViewChildFrame::MovePluginWindows( | 133 void RenderWidgetHostViewChildFrame::MovePluginWindows( |
130 const std::vector<WebPluginGeometry>& moves) { | 134 const std::vector<WebPluginGeometry>& moves) { |
131 } | 135 } |
132 | 136 |
133 void RenderWidgetHostViewChildFrame::UpdateCursor(const WebCursor& cursor) { | 137 void RenderWidgetHostViewChildFrame::UpdateCursor(const WebCursor& cursor) { |
134 } | 138 } |
135 | 139 |
136 void RenderWidgetHostViewChildFrame::SetIsLoading(bool is_loading) { | 140 void RenderWidgetHostViewChildFrame::SetIsLoading(bool is_loading) { |
141 // Inner WebContents reaches this, so skip the NOTREACHED() check below. | |
142 if (base::CommandLine::ForCurrentProcess()->HasSwitch( | |
143 switches::kSitePerProcess) && | |
144 BrowserPluginGuest::IsGuest( | |
145 static_cast<RenderViewHostImpl*>(RenderViewHost::From(host_)))) { | |
nasko
2015/05/28 22:13:46
Why static cast? Just call RenderViewHostImpl::Fro
lazyboy
2015/05/29 00:02:24
I need From() not FromID(), did you want me to do
| |
146 return; | |
147 } | |
148 | |
137 NOTREACHED(); | 149 NOTREACHED(); |
138 } | 150 } |
139 | 151 |
140 void RenderWidgetHostViewChildFrame::TextInputTypeChanged( | 152 void RenderWidgetHostViewChildFrame::TextInputTypeChanged( |
141 ui::TextInputType type, | 153 ui::TextInputType type, |
142 ui::TextInputMode input_mode, | 154 ui::TextInputMode input_mode, |
143 bool can_compose_inline, | 155 bool can_compose_inline, |
144 int flags) { | 156 int flags) { |
145 // TODO(kenrb): Implement. | 157 // TODO(kenrb): Implement. |
146 } | 158 } |
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
302 #endif // defined(OS_WIN) | 314 #endif // defined(OS_WIN) |
303 | 315 |
304 BrowserAccessibilityManager* | 316 BrowserAccessibilityManager* |
305 RenderWidgetHostViewChildFrame::CreateBrowserAccessibilityManager( | 317 RenderWidgetHostViewChildFrame::CreateBrowserAccessibilityManager( |
306 BrowserAccessibilityDelegate* delegate) { | 318 BrowserAccessibilityDelegate* delegate) { |
307 return BrowserAccessibilityManager::Create( | 319 return BrowserAccessibilityManager::Create( |
308 BrowserAccessibilityManager::GetEmptyDocument(), delegate); | 320 BrowserAccessibilityManager::GetEmptyDocument(), delegate); |
309 } | 321 } |
310 | 322 |
311 } // namespace content | 323 } // namespace content |
OLD | NEW |