Chromium Code Reviews| 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 2461 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2472 #endif | 2472 #endif |
| 2473 #endif | 2473 #endif |
| 2474 return NULL; | 2474 return NULL; |
| 2475 } | 2475 } |
| 2476 | 2476 |
| 2477 void RenderFrameImpl::LoadURLExternally(const blink::WebURLRequest& request, | 2477 void RenderFrameImpl::LoadURLExternally(const blink::WebURLRequest& request, |
| 2478 blink::WebNavigationPolicy policy) { | 2478 blink::WebNavigationPolicy policy) { |
| 2479 loadURLExternally(request, policy, WebString(), false); | 2479 loadURLExternally(request, policy, WebString(), false); |
| 2480 } | 2480 } |
| 2481 | 2481 |
| 2482 void RenderFrameImpl::loadErrorPage(int reason) { | |
| 2483 blink::WebURLError error; | |
| 2484 error.unreachableURL = frame_->document().url(); | |
| 2485 error.domain = WebString::fromUTF8(net::kErrorDomain); | |
| 2486 error.reason = reason; | |
| 2487 | |
| 2488 std::string error_html; | |
| 2489 GetContentClient()->renderer()->GetNavigationErrorStrings( | |
| 2490 this, frame_->dataSource()->request(), error, &error_html, nullptr); | |
| 2491 | |
| 2492 frame_->loadData(error_html, WebString::fromUTF8("text/html"), | |
| 2493 WebString::fromUTF8("UTF-8"), GURL(kUnreachableWebDataURL), | |
|
Tom Sepez
2016/10/20 18:26:58
Maybe truncate the ? and # portions of the url?
| |
| 2494 error.unreachableURL, true, blink::WebFrameLoadType::Standard , | |
| 2495 blink::WebHistoryItem(), blink::WebHistoryDifferentDocumentLo ad, true); | |
| 2496 } | |
| 2497 | |
| 2482 void RenderFrameImpl::ExecuteJavaScript(const base::string16& javascript) { | 2498 void RenderFrameImpl::ExecuteJavaScript(const base::string16& javascript) { |
| 2483 OnJavaScriptExecuteRequest(javascript, 0, false); | 2499 OnJavaScriptExecuteRequest(javascript, 0, false); |
| 2484 } | 2500 } |
| 2485 | 2501 |
| 2486 service_manager::InterfaceRegistry* RenderFrameImpl::GetInterfaceRegistry() { | 2502 service_manager::InterfaceRegistry* RenderFrameImpl::GetInterfaceRegistry() { |
| 2487 return interface_registry_.get(); | 2503 return interface_registry_.get(); |
| 2488 } | 2504 } |
| 2489 | 2505 |
| 2490 service_manager::InterfaceProvider* RenderFrameImpl::GetRemoteInterfaces() { | 2506 service_manager::InterfaceProvider* RenderFrameImpl::GetRemoteInterfaces() { |
| 2491 return remote_interfaces_.get(); | 2507 return remote_interfaces_.get(); |
| (...skipping 4057 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 6549 // event target. Potentially a Pepper plugin will receive the event. | 6565 // event target. Potentially a Pepper plugin will receive the event. |
| 6550 // In order to tell whether a plugin gets the last mouse event and which it | 6566 // In order to tell whether a plugin gets the last mouse event and which it |
| 6551 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets | 6567 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets |
| 6552 // the event, it will notify us via DidReceiveMouseEvent() and set itself as | 6568 // the event, it will notify us via DidReceiveMouseEvent() and set itself as |
| 6553 // |pepper_last_mouse_event_target_|. | 6569 // |pepper_last_mouse_event_target_|. |
| 6554 pepper_last_mouse_event_target_ = nullptr; | 6570 pepper_last_mouse_event_target_ = nullptr; |
| 6555 #endif | 6571 #endif |
| 6556 } | 6572 } |
| 6557 | 6573 |
| 6558 } // namespace content | 6574 } // namespace content |
| OLD | NEW |