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

Side by Side Diff: chrome/browser/ui/browser.cc

Issue 267103002: Ignore title parameter for navigator.registerProtocolHandler. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix tests Created 6 years, 7 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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 "chrome/browser/ui/browser.h" 5 #include "chrome/browser/ui/browser.h"
6 6
7 #if defined(OS_WIN) 7 #if defined(OS_WIN)
8 #include <windows.h> 8 #include <windows.h>
9 #include <shellapi.h> 9 #include <shellapi.h>
10 #endif // defined(OS_WIN) 10 #endif // defined(OS_WIN)
(...skipping 1599 matching lines...) Expand 10 before | Expand all | Expand 10 after
1610 } 1610 }
1611 1611
1612 bool Browser::IsFullscreenForTabOrPending( 1612 bool Browser::IsFullscreenForTabOrPending(
1613 const WebContents* web_contents) const { 1613 const WebContents* web_contents) const {
1614 return fullscreen_controller_->IsFullscreenForTabOrPending(web_contents); 1614 return fullscreen_controller_->IsFullscreenForTabOrPending(web_contents);
1615 } 1615 }
1616 1616
1617 void Browser::RegisterProtocolHandler(WebContents* web_contents, 1617 void Browser::RegisterProtocolHandler(WebContents* web_contents,
1618 const std::string& protocol, 1618 const std::string& protocol,
1619 const GURL& url, 1619 const GURL& url,
1620 const base::string16& title,
1621 bool user_gesture) { 1620 bool user_gesture) {
1622 Profile* profile = 1621 Profile* profile =
1623 Profile::FromBrowserContext(web_contents->GetBrowserContext()); 1622 Profile::FromBrowserContext(web_contents->GetBrowserContext());
1624 if (profile->IsOffTheRecord()) 1623 if (profile->IsOffTheRecord())
1625 return; 1624 return;
1626 1625
1627 ProtocolHandler handler = 1626 ProtocolHandler handler =
1628 ProtocolHandler::CreateProtocolHandler(protocol, url, title); 1627 ProtocolHandler::CreateProtocolHandler(protocol, url);
1629 1628
1630 ProtocolHandlerRegistry* registry = 1629 ProtocolHandlerRegistry* registry =
1631 ProtocolHandlerRegistryFactory::GetForProfile(profile); 1630 ProtocolHandlerRegistryFactory::GetForProfile(profile);
1632 if (registry->SilentlyHandleRegisterHandlerRequest(handler)) 1631 if (registry->SilentlyHandleRegisterHandlerRequest(handler))
1633 return; 1632 return;
1634 1633
1635 TabSpecificContentSettings* tab_content_settings = 1634 TabSpecificContentSettings* tab_content_settings =
1636 TabSpecificContentSettings::FromWebContents(web_contents); 1635 TabSpecificContentSettings::FromWebContents(web_contents);
1637 if (!user_gesture && window_) { 1636 if (!user_gesture && window_) {
1638 tab_content_settings->set_pending_protocol_handler(handler); 1637 tab_content_settings->set_pending_protocol_handler(handler);
(...skipping 778 matching lines...) Expand 10 before | Expand all | Expand 10 after
2417 if (contents && !allow_js_access) { 2416 if (contents && !allow_js_access) {
2418 contents->web_contents()->GetController().LoadURL( 2417 contents->web_contents()->GetController().LoadURL(
2419 target_url, 2418 target_url,
2420 content::Referrer(), 2419 content::Referrer(),
2421 content::PAGE_TRANSITION_LINK, 2420 content::PAGE_TRANSITION_LINK,
2422 std::string()); // No extra headers. 2421 std::string()); // No extra headers.
2423 } 2422 }
2424 2423
2425 return contents != NULL; 2424 return contents != NULL;
2426 } 2425 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/browser.h ('k') | chrome/browser/ui/content_settings/content_setting_bubble_model.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698