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

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: Remove all title references 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 1589 matching lines...) Expand 10 before | Expand all | Expand 10 after
1600 } 1600 }
1601 1601
1602 bool Browser::IsFullscreenForTabOrPending( 1602 bool Browser::IsFullscreenForTabOrPending(
1603 const WebContents* web_contents) const { 1603 const WebContents* web_contents) const {
1604 return fullscreen_controller_->IsFullscreenForTabOrPending(web_contents); 1604 return fullscreen_controller_->IsFullscreenForTabOrPending(web_contents);
1605 } 1605 }
1606 1606
1607 void Browser::RegisterProtocolHandler(WebContents* web_contents, 1607 void Browser::RegisterProtocolHandler(WebContents* web_contents,
1608 const std::string& protocol, 1608 const std::string& protocol,
1609 const GURL& url, 1609 const GURL& url,
1610 const base::string16& title,
1611 bool user_gesture) { 1610 bool user_gesture) {
1612 Profile* profile = 1611 Profile* profile =
1613 Profile::FromBrowserContext(web_contents->GetBrowserContext()); 1612 Profile::FromBrowserContext(web_contents->GetBrowserContext());
1614 if (profile->IsOffTheRecord()) 1613 if (profile->IsOffTheRecord())
1615 return; 1614 return;
1616 1615
1617 ProtocolHandler handler = 1616 ProtocolHandler handler =
1618 ProtocolHandler::CreateProtocolHandler(protocol, url, title); 1617 ProtocolHandler::CreateProtocolHandler(protocol, url);
1619 1618
1620 ProtocolHandlerRegistry* registry = 1619 ProtocolHandlerRegistry* registry =
1621 ProtocolHandlerRegistryFactory::GetForProfile(profile); 1620 ProtocolHandlerRegistryFactory::GetForProfile(profile);
1622 if (registry->SilentlyHandleRegisterHandlerRequest(handler)) 1621 if (registry->SilentlyHandleRegisterHandlerRequest(handler))
1623 return; 1622 return;
1624 1623
1625 TabSpecificContentSettings* tab_content_settings = 1624 TabSpecificContentSettings* tab_content_settings =
1626 TabSpecificContentSettings::FromWebContents(web_contents); 1625 TabSpecificContentSettings::FromWebContents(web_contents);
1627 if (!user_gesture && window_) { 1626 if (!user_gesture && window_) {
1628 tab_content_settings->set_pending_protocol_handler(handler); 1627 tab_content_settings->set_pending_protocol_handler(handler);
(...skipping 783 matching lines...) Expand 10 before | Expand all | Expand 10 after
2412 if (contents && !allow_js_access) { 2411 if (contents && !allow_js_access) {
2413 contents->web_contents()->GetController().LoadURL( 2412 contents->web_contents()->GetController().LoadURL(
2414 target_url, 2413 target_url,
2415 content::Referrer(), 2414 content::Referrer(),
2416 content::PAGE_TRANSITION_LINK, 2415 content::PAGE_TRANSITION_LINK,
2417 std::string()); // No extra headers. 2416 std::string()); // No extra headers.
2418 } 2417 }
2419 2418
2420 return contents != NULL; 2419 return contents != NULL;
2421 } 2420 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698