OLD | NEW |
---|---|
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/renderer/render_frame_impl.h" | 5 #include "content/renderer/render_frame_impl.h" |
6 | 6 |
7 #include <map> | 7 #include <map> |
8 #include <string> | 8 #include <string> |
9 #include <utility> | 9 #include <utility> |
10 #include <vector> | 10 #include <vector> |
(...skipping 1334 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1345 if (render_view()->webview()) | 1345 if (render_view()->webview()) |
1346 active_url = render_view()->GetURLForGraphicsContext3D(); | 1346 active_url = render_view()->GetURLForGraphicsContext3D(); |
1347 | 1347 |
1348 // Synchronous IPC to obtain a routing id for the fullscreen widget. | 1348 // Synchronous IPC to obtain a routing id for the fullscreen widget. |
1349 int32_t fullscreen_widget_routing_id = MSG_ROUTING_NONE; | 1349 int32_t fullscreen_widget_routing_id = MSG_ROUTING_NONE; |
1350 if (!RenderThreadImpl::current_render_message_filter() | 1350 if (!RenderThreadImpl::current_render_message_filter() |
1351 ->CreateFullscreenWidget(render_view()->routing_id(), | 1351 ->CreateFullscreenWidget(render_view()->routing_id(), |
1352 &fullscreen_widget_routing_id)) { | 1352 &fullscreen_widget_routing_id)) { |
1353 return nullptr; | 1353 return nullptr; |
1354 } | 1354 } |
1355 RenderWidget::ShowCallback show_callback = base::Bind( | |
1356 &RenderViewImpl::ShowCreatedFullscreenWidget, render_view()->AsWeakPtr()); | |
1355 | 1357 |
1356 RenderWidgetFullscreenPepper* widget = RenderWidgetFullscreenPepper::Create( | 1358 RenderWidgetFullscreenPepper* widget = RenderWidgetFullscreenPepper::Create( |
1357 fullscreen_widget_routing_id, render_view()->routing_id(), | 1359 fullscreen_widget_routing_id, show_callback, |
1358 GetRenderWidget()->compositor_deps(), plugin, active_url, | 1360 GetRenderWidget()->compositor_deps(), plugin, active_url, |
1359 GetRenderWidget()->screen_info()); | 1361 GetRenderWidget()->screen_info()); |
1360 widget->show(blink::WebNavigationPolicyIgnore); | 1362 widget->show(blink::WebNavigationPolicyIgnore); |
lfg
2016/11/16 23:07:58
Do you need the callback here? show() is called im
ncarter (slow)
2016/11/16 23:14:08
That occurred to me too (though I'm looking at thi
lfg
2016/11/17 16:37:29
Acknowledged.
ncarter (slow)
2016/11/17 19:33:11
Comment added.
| |
1361 return widget; | 1363 return widget; |
1362 } | 1364 } |
1363 | 1365 |
1364 bool RenderFrameImpl::IsPepperAcceptingCompositionEvents() const { | 1366 bool RenderFrameImpl::IsPepperAcceptingCompositionEvents() const { |
1365 if (!focused_pepper_plugin_) | 1367 if (!focused_pepper_plugin_) |
1366 return false; | 1368 return false; |
1367 return focused_pepper_plugin_->IsPluginAcceptingCompositionEvents(); | 1369 return focused_pepper_plugin_->IsPluginAcceptingCompositionEvents(); |
1368 } | 1370 } |
1369 | 1371 |
1370 void RenderFrameImpl::PluginCrashed(const base::FilePath& plugin_path, | 1372 void RenderFrameImpl::PluginCrashed(const base::FilePath& plugin_path, |
(...skipping 3736 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
5107 ? static_cast<DocumentState*>(info.extraData) | 5109 ? static_cast<DocumentState*>(info.extraData) |
5108 ->navigation_state() | 5110 ->navigation_state() |
5109 ->IsContentInitiated() | 5111 ->IsContentInitiated() |
5110 : !IsBrowserInitiated(pending_navigation_params_.get()); | 5112 : !IsBrowserInitiated(pending_navigation_params_.get()); |
5111 bool is_redirect = | 5113 bool is_redirect = |
5112 info.extraData || | 5114 info.extraData || |
5113 (pending_navigation_params_ && | 5115 (pending_navigation_params_ && |
5114 !pending_navigation_params_->request_params.redirects.empty()); | 5116 !pending_navigation_params_->request_params.redirects.empty()); |
5115 | 5117 |
5116 #ifdef OS_ANDROID | 5118 #ifdef OS_ANDROID |
5119 bool render_view_was_created_with_opener = | |
5120 render_view_->was_created_by_renderer_; | |
5117 // The handlenavigation API is deprecated and will be removed once | 5121 // The handlenavigation API is deprecated and will be removed once |
5118 // crbug.com/325351 is resolved. | 5122 // crbug.com/325351 is resolved. |
5119 if (GetContentClient()->renderer()->HandleNavigation( | 5123 if (GetContentClient()->renderer()->HandleNavigation( |
5120 this, is_content_initiated, render_view_->opener_id_, frame_, | 5124 this, is_content_initiated, render_view_was_created_with_opener, |
5121 info.urlRequest, info.navigationType, info.defaultPolicy, | 5125 frame_, info.urlRequest, info.navigationType, info.defaultPolicy, |
5122 is_redirect)) { | 5126 is_redirect)) { |
5123 return blink::WebNavigationPolicyIgnore; | 5127 return blink::WebNavigationPolicyIgnore; |
5124 } | 5128 } |
5125 #endif | 5129 #endif |
5126 | 5130 |
5127 Referrer referrer( | 5131 Referrer referrer( |
5128 RenderViewImpl::GetReferrerFromRequest(frame_, info.urlRequest)); | 5132 RenderViewImpl::GetReferrerFromRequest(frame_, info.urlRequest)); |
5129 | 5133 |
5130 // Webkit is asking whether to navigate to a new URL. | 5134 // Webkit is asking whether to navigate to a new URL. |
5131 // This is fine normally, except if we're showing UI from one security | 5135 // This is fine normally, except if we're showing UI from one security |
(...skipping 1491 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
6623 // event target. Potentially a Pepper plugin will receive the event. | 6627 // event target. Potentially a Pepper plugin will receive the event. |
6624 // In order to tell whether a plugin gets the last mouse event and which it | 6628 // In order to tell whether a plugin gets the last mouse event and which it |
6625 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets | 6629 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets |
6626 // the event, it will notify us via DidReceiveMouseEvent() and set itself as | 6630 // the event, it will notify us via DidReceiveMouseEvent() and set itself as |
6627 // |pepper_last_mouse_event_target_|. | 6631 // |pepper_last_mouse_event_target_|. |
6628 pepper_last_mouse_event_target_ = nullptr; | 6632 pepper_last_mouse_event_target_ = nullptr; |
6629 #endif | 6633 #endif |
6630 } | 6634 } |
6631 | 6635 |
6632 } // namespace content | 6636 } // namespace content |
OLD | NEW |