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 796 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
807 | 807 |
808 find_helper_.CancelAllFindSessions(); | 808 find_helper_.CancelAllFindSessions(); |
809 } | 809 } |
810 | 810 |
811 void WebViewGuest::DidFailProvisionalLoad( | 811 void WebViewGuest::DidFailProvisionalLoad( |
812 content::RenderFrameHost* render_frame_host, | 812 content::RenderFrameHost* render_frame_host, |
813 const GURL& validated_url, | 813 const GURL& validated_url, |
814 int error_code, | 814 int error_code, |
815 const base::string16& error_description, | 815 const base::string16& error_description, |
816 bool was_ignored_by_handler) { | 816 bool was_ignored_by_handler) { |
817 // Suppress loadabort for "mailto" URLs. | |
818 if (validated_url.SchemeIs("mailto")) | |
lazyboy
2015/07/07 19:32:11
This seems like a hack, can you explain what's goi
paulmeyer
2015/07/08 17:20:16
Yes, it does exactly what happens in a tab. With a
lazyboy
2015/07/10 19:46:50
When we click mailto: from a regular tab page, doe
paulmeyer
2015/07/13 19:47:14
Yes it does, and it ends up calling NavigatorImpl:
| |
819 return; | |
820 | |
817 LoadAbort(!render_frame_host->GetParent(), validated_url, error_code, | 821 LoadAbort(!render_frame_host->GetParent(), validated_url, error_code, |
818 net::ErrorToShortString(error_code)); | 822 net::ErrorToShortString(error_code)); |
819 } | 823 } |
820 | 824 |
821 void WebViewGuest::DidStartProvisionalLoadForFrame( | 825 void WebViewGuest::DidStartProvisionalLoadForFrame( |
822 content::RenderFrameHost* render_frame_host, | 826 content::RenderFrameHost* render_frame_host, |
823 const GURL& validated_url, | 827 const GURL& validated_url, |
824 bool is_error_page, | 828 bool is_error_page, |
825 bool is_iframe_srcdoc) { | 829 bool is_iframe_srcdoc) { |
826 scoped_ptr<base::DictionaryValue> args(new base::DictionaryValue()); | 830 scoped_ptr<base::DictionaryValue> args(new base::DictionaryValue()); |
(...skipping 634 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1461 scoped_ptr<base::DictionaryValue> args(new base::DictionaryValue()); | 1465 scoped_ptr<base::DictionaryValue> args(new base::DictionaryValue()); |
1462 DispatchEventToView( | 1466 DispatchEventToView( |
1463 new GuestViewEvent(webview::kEventExitFullscreen, args.Pass())); | 1467 new GuestViewEvent(webview::kEventExitFullscreen, args.Pass())); |
1464 } | 1468 } |
1465 // Since we changed fullscreen state, sending a Resize message ensures that | 1469 // Since we changed fullscreen state, sending a Resize message ensures that |
1466 // renderer/ sees the change. | 1470 // renderer/ sees the change. |
1467 web_contents()->GetRenderViewHost()->WasResized(); | 1471 web_contents()->GetRenderViewHost()->WasResized(); |
1468 } | 1472 } |
1469 | 1473 |
1470 } // namespace extensions | 1474 } // namespace extensions |
OLD | NEW |