| 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 #import "chrome/browser/ui/cocoa/content_settings/content_setting_bubble_cocoa.h
" | 5 #import "chrome/browser/ui/cocoa/content_settings/content_setting_bubble_cocoa.h
" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "base/sys_string_conversions.h" | 9 #include "base/sys_string_conversions.h" |
| 10 #include "base/utf_string_conversions.h" | 10 #include "base/utf_string_conversions.h" |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 116 scoped_ptr<ContentSettingBubbleModel> model(contentSettingBubbleModel); | 116 scoped_ptr<ContentSettingBubbleModel> model(contentSettingBubbleModel); |
| 117 DCHECK(model.get()); | 117 DCHECK(model.get()); |
| 118 | 118 |
| 119 ContentSettingsType settingsType = model->content_type(); | 119 ContentSettingsType settingsType = model->content_type(); |
| 120 NSString* nibPath = @""; | 120 NSString* nibPath = @""; |
| 121 switch (settingsType) { | 121 switch (settingsType) { |
| 122 case CONTENT_SETTINGS_TYPE_COOKIES: | 122 case CONTENT_SETTINGS_TYPE_COOKIES: |
| 123 nibPath = @"ContentBlockedCookies"; break; | 123 nibPath = @"ContentBlockedCookies"; break; |
| 124 case CONTENT_SETTINGS_TYPE_IMAGES: | 124 case CONTENT_SETTINGS_TYPE_IMAGES: |
| 125 case CONTENT_SETTINGS_TYPE_JAVASCRIPT: | 125 case CONTENT_SETTINGS_TYPE_JAVASCRIPT: |
| 126 case CONTENT_SETTINGS_TYPE_MEDIASTREAM: |
| 126 case CONTENT_SETTINGS_TYPE_PPAPI_BROKER: | 127 case CONTENT_SETTINGS_TYPE_PPAPI_BROKER: |
| 127 nibPath = @"ContentBlockedSimple"; break; | 128 nibPath = @"ContentBlockedSimple"; break; |
| 128 case CONTENT_SETTINGS_TYPE_PLUGINS: | 129 case CONTENT_SETTINGS_TYPE_PLUGINS: |
| 129 nibPath = @"ContentBlockedPlugins"; break; | 130 nibPath = @"ContentBlockedPlugins"; break; |
| 130 case CONTENT_SETTINGS_TYPE_POPUPS: | 131 case CONTENT_SETTINGS_TYPE_POPUPS: |
| 131 nibPath = @"ContentBlockedPopups"; break; | 132 nibPath = @"ContentBlockedPopups"; break; |
| 132 case CONTENT_SETTINGS_TYPE_GEOLOCATION: | 133 case CONTENT_SETTINGS_TYPE_GEOLOCATION: |
| 133 nibPath = @"ContentBlockedGeolocation"; break; | 134 nibPath = @"ContentBlockedGeolocation"; break; |
| 134 case CONTENT_SETTINGS_TYPE_MIXEDSCRIPT: | 135 case CONTENT_SETTINGS_TYPE_MIXEDSCRIPT: |
| 135 nibPath = @"ContentBlockedMixedScript"; break; | 136 nibPath = @"ContentBlockedMixedScript"; break; |
| 136 case CONTENT_SETTINGS_TYPE_PROTOCOL_HANDLERS: | 137 case CONTENT_SETTINGS_TYPE_PROTOCOL_HANDLERS: |
| 137 nibPath = @"ContentProtocolHandlers"; break; | 138 nibPath = @"ContentProtocolHandlers"; break; |
| 138 case CONTENT_SETTINGS_TYPE_MEDIASTREAM: | |
| 139 nibPath = @"ContentBlockedMedia"; break; | |
| 140 // These content types have no bubble: | 139 // These content types have no bubble: |
| 141 case CONTENT_SETTINGS_TYPE_DEFAULT: | 140 case CONTENT_SETTINGS_TYPE_DEFAULT: |
| 142 case CONTENT_SETTINGS_TYPE_NOTIFICATIONS: | 141 case CONTENT_SETTINGS_TYPE_NOTIFICATIONS: |
| 143 case CONTENT_SETTINGS_TYPE_AUTO_SELECT_CERTIFICATE: | 142 case CONTENT_SETTINGS_TYPE_AUTO_SELECT_CERTIFICATE: |
| 144 case CONTENT_SETTINGS_TYPE_FULLSCREEN: | 143 case CONTENT_SETTINGS_TYPE_FULLSCREEN: |
| 145 case CONTENT_SETTINGS_TYPE_MOUSELOCK: | 144 case CONTENT_SETTINGS_TYPE_MOUSELOCK: |
| 146 case CONTENT_SETTINGS_TYPE_MEDIASTREAM_MIC: | 145 case CONTENT_SETTINGS_TYPE_MEDIASTREAM_MIC: |
| 147 case CONTENT_SETTINGS_TYPE_MEDIASTREAM_CAMERA: | 146 case CONTENT_SETTINGS_TYPE_MEDIASTREAM_CAMERA: |
| 148 case CONTENT_SETTINGS_NUM_TYPES: | 147 case CONTENT_SETTINGS_NUM_TYPES: |
| 149 NOTREACHED(); | 148 NOTREACHED(); |
| (...skipping 347 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 497 - (IBAction)manageBlocking:(id)sender { | 496 - (IBAction)manageBlocking:(id)sender { |
| 498 contentSettingBubbleModel_->OnManageLinkClicked(); | 497 contentSettingBubbleModel_->OnManageLinkClicked(); |
| 499 } | 498 } |
| 500 | 499 |
| 501 - (IBAction)closeBubble:(id)sender { | 500 - (IBAction)closeBubble:(id)sender { |
| 502 contentSettingBubbleModel_->OnDoneClicked(); | 501 contentSettingBubbleModel_->OnDoneClicked(); |
| 503 [self close]; | 502 [self close]; |
| 504 } | 503 } |
| 505 | 504 |
| 506 @end // ContentSettingBubbleController | 505 @end // ContentSettingBubbleController |
| OLD | NEW |