Chromium Code Reviews| 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 "extensions/browser/guest_view/web_view/web_view_guest.h" | 5 #include "extensions/browser/guest_view/web_view/web_view_guest.h" |
| 6 | 6 |
| 7 #include "base/message_loop/message_loop.h" | 7 #include "base/message_loop/message_loop.h" |
| 8 #include "base/strings/stringprintf.h" | 8 #include "base/strings/stringprintf.h" |
| 9 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
| 10 #include "components/browsing_data/storage_partition_http_cache_data_remover.h" | 10 #include "components/browsing_data/storage_partition_http_cache_data_remover.h" |
| (...skipping 792 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 803 | 803 |
| 804 find_helper_.CancelAllFindSessions(); | 804 find_helper_.CancelAllFindSessions(); |
| 805 } | 805 } |
| 806 | 806 |
| 807 void WebViewGuest::DidFailProvisionalLoad( | 807 void WebViewGuest::DidFailProvisionalLoad( |
| 808 content::RenderFrameHost* render_frame_host, | 808 content::RenderFrameHost* render_frame_host, |
| 809 const GURL& validated_url, | 809 const GURL& validated_url, |
| 810 int error_code, | 810 int error_code, |
| 811 const base::string16& error_description, | 811 const base::string16& error_description, |
| 812 bool was_ignored_by_handler) { | 812 bool was_ignored_by_handler) { |
| 813 // Suppress loadabort for "mailto" URLs. | |
| 814 if (validated_url.SchemeIs("mailto")) | |
|
lazyboy
2015/07/13 20:27:28
url::kMailToScheme
| |
| 815 return; | |
| 816 | |
| 813 LoadAbort(!render_frame_host->GetParent(), validated_url, error_code, | 817 LoadAbort(!render_frame_host->GetParent(), validated_url, error_code, |
| 814 net::ErrorToShortString(error_code)); | 818 net::ErrorToShortString(error_code)); |
| 815 } | 819 } |
| 816 | 820 |
| 817 void WebViewGuest::DidStartProvisionalLoadForFrame( | 821 void WebViewGuest::DidStartProvisionalLoadForFrame( |
| 818 content::RenderFrameHost* render_frame_host, | 822 content::RenderFrameHost* render_frame_host, |
| 819 const GURL& validated_url, | 823 const GURL& validated_url, |
| 820 bool is_error_page, | 824 bool is_error_page, |
| 821 bool is_iframe_srcdoc) { | 825 bool is_iframe_srcdoc) { |
| 822 scoped_ptr<base::DictionaryValue> args(new base::DictionaryValue()); | 826 scoped_ptr<base::DictionaryValue> args(new base::DictionaryValue()); |
| (...skipping 634 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1457 scoped_ptr<base::DictionaryValue> args(new base::DictionaryValue()); | 1461 scoped_ptr<base::DictionaryValue> args(new base::DictionaryValue()); |
| 1458 DispatchEventToView( | 1462 DispatchEventToView( |
| 1459 new GuestViewEvent(webview::kEventExitFullscreen, args.Pass())); | 1463 new GuestViewEvent(webview::kEventExitFullscreen, args.Pass())); |
| 1460 } | 1464 } |
| 1461 // Since we changed fullscreen state, sending a Resize message ensures that | 1465 // Since we changed fullscreen state, sending a Resize message ensures that |
| 1462 // renderer/ sees the change. | 1466 // renderer/ sees the change. |
| 1463 web_contents()->GetRenderViewHost()->WasResized(); | 1467 web_contents()->GetRenderViewHost()->WasResized(); |
| 1464 } | 1468 } |
| 1465 | 1469 |
| 1466 } // namespace extensions | 1470 } // namespace extensions |
| OLD | NEW |