| 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 779 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 790 | 790 |
| 791 find_helper_.CancelAllFindSessions(); | 791 find_helper_.CancelAllFindSessions(); |
| 792 } | 792 } |
| 793 | 793 |
| 794 void WebViewGuest::DidFailProvisionalLoad( | 794 void WebViewGuest::DidFailProvisionalLoad( |
| 795 content::RenderFrameHost* render_frame_host, | 795 content::RenderFrameHost* render_frame_host, |
| 796 const GURL& validated_url, | 796 const GURL& validated_url, |
| 797 int error_code, | 797 int error_code, |
| 798 const base::string16& error_description, | 798 const base::string16& error_description, |
| 799 bool was_ignored_by_handler) { | 799 bool was_ignored_by_handler) { |
| 800 // Suppress loadabort for "mailto" URLs. |
| 801 if (validated_url.SchemeIs(url::kMailToScheme)) |
| 802 return; |
| 803 |
| 800 LoadAbort(!render_frame_host->GetParent(), validated_url, error_code, | 804 LoadAbort(!render_frame_host->GetParent(), validated_url, error_code, |
| 801 net::ErrorToShortString(error_code)); | 805 net::ErrorToShortString(error_code)); |
| 802 } | 806 } |
| 803 | 807 |
| 804 void WebViewGuest::DidStartProvisionalLoadForFrame( | 808 void WebViewGuest::DidStartProvisionalLoadForFrame( |
| 805 content::RenderFrameHost* render_frame_host, | 809 content::RenderFrameHost* render_frame_host, |
| 806 const GURL& validated_url, | 810 const GURL& validated_url, |
| 807 bool is_error_page, | 811 bool is_error_page, |
| 808 bool is_iframe_srcdoc) { | 812 bool is_iframe_srcdoc) { |
| 809 scoped_ptr<base::DictionaryValue> args(new base::DictionaryValue()); | 813 scoped_ptr<base::DictionaryValue> args(new base::DictionaryValue()); |
| (...skipping 635 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1445 scoped_ptr<base::DictionaryValue> args(new base::DictionaryValue()); | 1449 scoped_ptr<base::DictionaryValue> args(new base::DictionaryValue()); |
| 1446 DispatchEventToView( | 1450 DispatchEventToView( |
| 1447 new GuestViewEvent(webview::kEventExitFullscreen, args.Pass())); | 1451 new GuestViewEvent(webview::kEventExitFullscreen, args.Pass())); |
| 1448 } | 1452 } |
| 1449 // Since we changed fullscreen state, sending a Resize message ensures that | 1453 // Since we changed fullscreen state, sending a Resize message ensures that |
| 1450 // renderer/ sees the change. | 1454 // renderer/ sees the change. |
| 1451 web_contents()->GetRenderViewHost()->WasResized(); | 1455 web_contents()->GetRenderViewHost()->WasResized(); |
| 1452 } | 1456 } |
| 1453 | 1457 |
| 1454 } // namespace extensions | 1458 } // namespace extensions |
| OLD | NEW |