| 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 595 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 606 media::Context3D GetSharedMainThreadContext3D() { | 606 media::Context3D GetSharedMainThreadContext3D() { |
| 607 cc::ContextProvider* provider = | 607 cc::ContextProvider* provider = |
| 608 RenderThreadImpl::current()->SharedMainThreadContextProvider().get(); | 608 RenderThreadImpl::current()->SharedMainThreadContextProvider().get(); |
| 609 if (!provider) | 609 if (!provider) |
| 610 return media::Context3D(); | 610 return media::Context3D(); |
| 611 return media::Context3D(provider->ContextGL(), provider->GrContext()); | 611 return media::Context3D(provider->ContextGL(), provider->GrContext()); |
| 612 } | 612 } |
| 613 | 613 |
| 614 bool IsReload(FrameMsg_Navigate_Type::Value navigation_type) { | 614 bool IsReload(FrameMsg_Navigate_Type::Value navigation_type) { |
| 615 return navigation_type == FrameMsg_Navigate_Type::RELOAD || | 615 return navigation_type == FrameMsg_Navigate_Type::RELOAD || |
| 616 navigation_type == FrameMsg_Navigate_Type::RELOAD_IGNORING_CACHE || | 616 navigation_type == FrameMsg_Navigate_Type::RELOAD_BYPASSING_CACHE || |
| 617 navigation_type == FrameMsg_Navigate_Type::RELOAD_ORIGINAL_REQUEST_URL; | 617 navigation_type == FrameMsg_Navigate_Type::RELOAD_ORIGINAL_REQUEST_URL; |
| 618 } | 618 } |
| 619 | 619 |
| 620 RenderFrameImpl::CreateRenderFrameImplFunction g_create_render_frame_impl = | 620 RenderFrameImpl::CreateRenderFrameImplFunction g_create_render_frame_impl = |
| 621 nullptr; | 621 nullptr; |
| 622 | 622 |
| 623 void OnGotInstanceID(mojo::shell::mojom::ConnectResult result, | 623 void OnGotInstanceID(mojo::shell::mojom::ConnectResult result, |
| 624 const std::string& user_id, uint32_t instance_id) {} | 624 const std::string& user_id, uint32_t instance_id) {} |
| 625 | 625 |
| 626 WebString ConvertRelativePathToHtmlAttribute(const base::FilePath& path) { | 626 WebString ConvertRelativePathToHtmlAttribute(const base::FilePath& path) { |
| (...skipping 4654 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5281 // navigation for this request (since it already went to the browser). | 5281 // navigation for this request (since it already went to the browser). |
| 5282 if (browser_side_navigation) | 5282 if (browser_side_navigation) |
| 5283 request.setCheckForBrowserSideNavigation(false); | 5283 request.setCheckForBrowserSideNavigation(false); |
| 5284 | 5284 |
| 5285 // If we are reloading, then use the history state of the current frame. | 5285 // If we are reloading, then use the history state of the current frame. |
| 5286 // Otherwise, if we have history state, then we need to navigate to it, which | 5286 // Otherwise, if we have history state, then we need to navigate to it, which |
| 5287 // corresponds to a back/forward navigation event. Update the parameters | 5287 // corresponds to a back/forward navigation event. Update the parameters |
| 5288 // depending on the navigation type. | 5288 // depending on the navigation type. |
| 5289 if (is_reload) { | 5289 if (is_reload) { |
| 5290 bool ignore_cache = (common_params.navigation_type == | 5290 bool ignore_cache = (common_params.navigation_type == |
| 5291 FrameMsg_Navigate_Type::RELOAD_IGNORING_CACHE); | 5291 FrameMsg_Navigate_Type::RELOAD_BYPASSING_CACHE); |
| 5292 load_type = ignore_cache ? blink::WebFrameLoadType::ReloadFromOrigin | 5292 load_type = ignore_cache ? blink::WebFrameLoadType::ReloadFromOrigin |
| 5293 : blink::WebFrameLoadType::Reload; | 5293 : blink::WebFrameLoadType::Reload; |
| 5294 | 5294 |
| 5295 if (!browser_side_navigation) { | 5295 if (!browser_side_navigation) { |
| 5296 const GURL override_url = | 5296 const GURL override_url = |
| 5297 (common_params.navigation_type == | 5297 (common_params.navigation_type == |
| 5298 FrameMsg_Navigate_Type::RELOAD_ORIGINAL_REQUEST_URL) | 5298 FrameMsg_Navigate_Type::RELOAD_ORIGINAL_REQUEST_URL) |
| 5299 ? common_params.url | 5299 ? common_params.url |
| 5300 : GURL(); | 5300 : GURL(); |
| 5301 request = frame_->requestForReload(load_type, override_url); | 5301 request = frame_->requestForReload(load_type, override_url); |
| (...skipping 711 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6013 int match_count, | 6013 int match_count, |
| 6014 int ordinal, | 6014 int ordinal, |
| 6015 const WebRect& selection_rect, | 6015 const WebRect& selection_rect, |
| 6016 bool final_status_update) { | 6016 bool final_status_update) { |
| 6017 Send(new FrameHostMsg_Find_Reply(routing_id_, request_id, match_count, | 6017 Send(new FrameHostMsg_Find_Reply(routing_id_, request_id, match_count, |
| 6018 selection_rect, ordinal, | 6018 selection_rect, ordinal, |
| 6019 final_status_update)); | 6019 final_status_update)); |
| 6020 } | 6020 } |
| 6021 | 6021 |
| 6022 } // namespace content | 6022 } // namespace content |
| OLD | NEW |