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

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

Issue 10584042: Bring up a content settings icon for ungestured registerProtocolHandler call. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge to head. Created 8 years, 6 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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_content_setting_bubble_model_delegate.h" 5 #include "chrome/browser/ui/browser_content_setting_bubble_model_delegate.h"
6 6
7 #include "chrome/browser/google/google_util.h" 7 #include "chrome/browser/google/google_util.h"
8 #include "chrome/browser/ui/browser.h" 8 #include "chrome/browser/ui/browser.h"
9 #include "chrome/browser/ui/chrome_pages.h" 9 #include "chrome/browser/ui/chrome_pages.h"
10 #include "chrome/common/url_constants.h"
10 11
11 // The URL for when the user clicks "learn more" on the mixed scripting page 12 // The URL for when the user clicks "learn more" on the mixed scripting page
12 // icon bubble. 13 // icon bubble.
13 const char kInsecureScriptHelpUrl[] = 14 const char kInsecureScriptHelpUrl[] =
14 "https://support.google.com/chrome/bin/answer.py?answer=1342714"; 15 "https://support.google.com/chrome/bin/answer.py?answer=1342714";
15 16
16 BrowserContentSettingBubbleModelDelegate:: 17 BrowserContentSettingBubbleModelDelegate::
17 BrowserContentSettingBubbleModelDelegate(Browser* browser) : browser_(browser) { 18 BrowserContentSettingBubbleModelDelegate(Browser* browser) : browser_(browser) {
18 } 19 }
19 20
20 BrowserContentSettingBubbleModelDelegate:: 21 BrowserContentSettingBubbleModelDelegate::
21 ~BrowserContentSettingBubbleModelDelegate() { 22 ~BrowserContentSettingBubbleModelDelegate() {
22 } 23 }
23 24
24 void BrowserContentSettingBubbleModelDelegate::ShowCollectedCookiesDialog( 25 void BrowserContentSettingBubbleModelDelegate::ShowCollectedCookiesDialog(
25 TabContents* contents) { 26 TabContents* contents) {
26 browser_->ShowCollectedCookiesDialog(contents); 27 browser_->ShowCollectedCookiesDialog(contents);
27 } 28 }
28 29
29 void BrowserContentSettingBubbleModelDelegate::ShowContentSettingsPage( 30 void BrowserContentSettingBubbleModelDelegate::ShowContentSettingsPage(
30 ContentSettingsType type) { 31 ContentSettingsType type) {
31 if (type == CONTENT_SETTINGS_TYPE_MIXEDSCRIPT) { 32 if (type == CONTENT_SETTINGS_TYPE_MIXEDSCRIPT) {
32 // We don't (yet?) implement user-settable exceptions for mixed script 33 // We don't (yet?) implement user-settable exceptions for mixed script
33 // blocking, so bounce to an explanatory page for now. 34 // blocking, so bounce to an explanatory page for now.
34 GURL url(google_util::AppendGoogleLocaleParam( 35 GURL url(google_util::AppendGoogleLocaleParam(
35 GURL(kInsecureScriptHelpUrl))); 36 GURL(kInsecureScriptHelpUrl)));
36 browser_->AddSelectedTabWithURL(url, content::PAGE_TRANSITION_LINK); 37 browser_->AddSelectedTabWithURL(url, content::PAGE_TRANSITION_LINK);
37 } else { 38 return;
38 chrome::ShowContentSettings(browser_, type);
39 } 39 }
40
41 if (type == CONTENT_SETTINGS_TYPE_REGISTER_PROTOCOL_HANDLER) {
42 chrome::ShowSettingsSubPage(browser_, chrome::kHandlerSettingsSubPage);
43 return;
44 }
45
46 chrome::ShowContentSettings(browser_, type);
40 } 47 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698