Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(44)

Side by Side Diff: extensions/browser/guest_view/web_view/web_view_guest.cc

Issue 1220813013: This patch enables "mailto" links in WebViews. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed test. Rebased. Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « chrome/test/data/extensions/platform_apps/web_view/shim/main.js ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « chrome/test/data/extensions/platform_apps/web_view/shim/main.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698