| 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 596 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 607 media::Context3D GetSharedMainThreadContext3D() { | 607 media::Context3D GetSharedMainThreadContext3D() { |
| 608 cc::ContextProvider* provider = | 608 cc::ContextProvider* provider = |
| 609 RenderThreadImpl::current()->SharedMainThreadContextProvider().get(); | 609 RenderThreadImpl::current()->SharedMainThreadContextProvider().get(); |
| 610 if (!provider) | 610 if (!provider) |
| 611 return media::Context3D(); | 611 return media::Context3D(); |
| 612 return media::Context3D(provider->ContextGL(), provider->GrContext()); | 612 return media::Context3D(provider->ContextGL(), provider->GrContext()); |
| 613 } | 613 } |
| 614 | 614 |
| 615 bool IsReload(FrameMsg_Navigate_Type::Value navigation_type) { | 615 bool IsReload(FrameMsg_Navigate_Type::Value navigation_type) { |
| 616 return navigation_type == FrameMsg_Navigate_Type::RELOAD || | 616 return navigation_type == FrameMsg_Navigate_Type::RELOAD || |
| 617 navigation_type == FrameMsg_Navigate_Type::RELOAD_IGNORING_CACHE || | 617 navigation_type == FrameMsg_Navigate_Type::RELOAD_BYPASSING_CACHE || |
| 618 navigation_type == FrameMsg_Navigate_Type::RELOAD_ORIGINAL_REQUEST_URL; | 618 navigation_type == FrameMsg_Navigate_Type::RELOAD_ORIGINAL_REQUEST_URL; |
| 619 } | 619 } |
| 620 | 620 |
| 621 RenderFrameImpl::CreateRenderFrameImplFunction g_create_render_frame_impl = | 621 RenderFrameImpl::CreateRenderFrameImplFunction g_create_render_frame_impl = |
| 622 nullptr; | 622 nullptr; |
| 623 | 623 |
| 624 void OnGotInstanceID(mojo::shell::mojom::ConnectResult result, | 624 void OnGotInstanceID(mojo::shell::mojom::ConnectResult result, |
| 625 const std::string& user_id, uint32_t instance_id) {} | 625 const std::string& user_id, uint32_t instance_id) {} |
| 626 | 626 |
| 627 WebString ConvertRelativePathToHtmlAttribute(const base::FilePath& path) { | 627 WebString ConvertRelativePathToHtmlAttribute(const base::FilePath& path) { |
| (...skipping 4671 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5299 // navigation for this request (since it already went to the browser). | 5299 // navigation for this request (since it already went to the browser). |
| 5300 if (browser_side_navigation) | 5300 if (browser_side_navigation) |
| 5301 request.setCheckForBrowserSideNavigation(false); | 5301 request.setCheckForBrowserSideNavigation(false); |
| 5302 | 5302 |
| 5303 // If we are reloading, then use the history state of the current frame. | 5303 // If we are reloading, then use the history state of the current frame. |
| 5304 // Otherwise, if we have history state, then we need to navigate to it, which | 5304 // Otherwise, if we have history state, then we need to navigate to it, which |
| 5305 // corresponds to a back/forward navigation event. Update the parameters | 5305 // corresponds to a back/forward navigation event. Update the parameters |
| 5306 // depending on the navigation type. | 5306 // depending on the navigation type. |
| 5307 if (is_reload) { | 5307 if (is_reload) { |
| 5308 bool ignore_cache = (common_params.navigation_type == | 5308 bool ignore_cache = (common_params.navigation_type == |
| 5309 FrameMsg_Navigate_Type::RELOAD_IGNORING_CACHE); | 5309 FrameMsg_Navigate_Type::RELOAD_BYPASSING_CACHE); |
| 5310 load_type = ignore_cache ? blink::WebFrameLoadType::ReloadBypassingCache | 5310 load_type = ignore_cache ? blink::WebFrameLoadType::ReloadBypassingCache |
| 5311 : blink::WebFrameLoadType::Reload; | 5311 : blink::WebFrameLoadType::Reload; |
| 5312 | 5312 |
| 5313 if (!browser_side_navigation) { | 5313 if (!browser_side_navigation) { |
| 5314 const GURL override_url = | 5314 const GURL override_url = |
| 5315 (common_params.navigation_type == | 5315 (common_params.navigation_type == |
| 5316 FrameMsg_Navigate_Type::RELOAD_ORIGINAL_REQUEST_URL) | 5316 FrameMsg_Navigate_Type::RELOAD_ORIGINAL_REQUEST_URL) |
| 5317 ? common_params.url | 5317 ? common_params.url |
| 5318 : GURL(); | 5318 : GURL(); |
| 5319 request = frame_->requestForReload(load_type, override_url); | 5319 request = frame_->requestForReload(load_type, override_url); |
| (...skipping 711 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6031 int match_count, | 6031 int match_count, |
| 6032 int ordinal, | 6032 int ordinal, |
| 6033 const WebRect& selection_rect, | 6033 const WebRect& selection_rect, |
| 6034 bool final_status_update) { | 6034 bool final_status_update) { |
| 6035 Send(new FrameHostMsg_Find_Reply(routing_id_, request_id, match_count, | 6035 Send(new FrameHostMsg_Find_Reply(routing_id_, request_id, match_count, |
| 6036 selection_rect, ordinal, | 6036 selection_rect, ordinal, |
| 6037 final_status_update)); | 6037 final_status_update)); |
| 6038 } | 6038 } |
| 6039 | 6039 |
| 6040 } // namespace content | 6040 } // namespace content |
| OLD | NEW |