| OLD | NEW |
| 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/content_settings/chrome_content_settings_utils.h" | 7 #include "chrome/browser/content_settings/chrome_content_settings_utils.h" |
| 8 #include "chrome/browser/ui/browser.h" | 8 #include "chrome/browser/ui/browser.h" |
| 9 #include "chrome/browser/ui/browser_tabstrip.h" | 9 #include "chrome/browser/ui/browser_tabstrip.h" |
| 10 #include "chrome/browser/ui/chrome_pages.h" | 10 #include "chrome/browser/ui/chrome_pages.h" |
| (...skipping 27 matching lines...) Expand all Loading... |
| 38 // blocking, so bounce to an explanatory page for now. | 38 // blocking, so bounce to an explanatory page for now. |
| 39 content_settings::RecordMixedScriptAction( | 39 content_settings::RecordMixedScriptAction( |
| 40 content_settings::MIXED_SCRIPT_ACTION_CLICKED_LEARN_MORE); | 40 content_settings::MIXED_SCRIPT_ACTION_CLICKED_LEARN_MORE); |
| 41 chrome::AddSelectedTabWithURL(browser_, | 41 chrome::AddSelectedTabWithURL(browser_, |
| 42 GURL(kInsecureScriptHelpUrl), | 42 GURL(kInsecureScriptHelpUrl), |
| 43 ui::PAGE_TRANSITION_LINK); | 43 ui::PAGE_TRANSITION_LINK); |
| 44 return; | 44 return; |
| 45 case CONTENT_SETTINGS_TYPE_PROTOCOL_HANDLERS: | 45 case CONTENT_SETTINGS_TYPE_PROTOCOL_HANDLERS: |
| 46 chrome::ShowSettingsSubPage(browser_, chrome::kHandlerSettingsSubPage); | 46 chrome::ShowSettingsSubPage(browser_, chrome::kHandlerSettingsSubPage); |
| 47 return; | 47 return; |
| 48 case CONTENT_SETTINGS_TYPE_MEDIASTREAM: |
| 49 // If the user requested to see the settings page for both camera |
| 50 // and microphone, point them to the default settings instead of |
| 51 // exceptions, as camera and microphone exceptions are now in two |
| 52 // different overlays. Specifically, point them to the microphone |
| 53 // default settings, as those appear first in the list. |
| 54 chrome::ShowContentSettings( |
| 55 browser_, CONTENT_SETTINGS_TYPE_MEDIASTREAM_MIC); |
| 48 default: | 56 default: |
| 49 chrome::ShowContentSettings(browser_, type); | 57 chrome::ShowContentSettingsExceptions(browser_, type); |
| 50 return; | 58 return; |
| 51 } | 59 } |
| 52 } | 60 } |
| 53 | 61 |
| 54 void BrowserContentSettingBubbleModelDelegate::ShowLearnMorePage( | 62 void BrowserContentSettingBubbleModelDelegate::ShowLearnMorePage( |
| 55 ContentSettingsType type) { | 63 ContentSettingsType type) { |
| 56 if (type != CONTENT_SETTINGS_TYPE_PLUGINS) | 64 if (type != CONTENT_SETTINGS_TYPE_PLUGINS) |
| 57 return; | 65 return; |
| 58 chrome::AddSelectedTabWithURL(browser_, | 66 chrome::AddSelectedTabWithURL(browser_, |
| 59 GURL(chrome::kBlockedPluginLearnMoreURL), | 67 GURL(chrome::kBlockedPluginLearnMoreURL), |
| 60 ui::PAGE_TRANSITION_LINK); | 68 ui::PAGE_TRANSITION_LINK); |
| 61 } | 69 } |
| OLD | NEW |