| 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 #ifndef CHROME_BROWSER_UI_CONTENT_SETTINGS_CONTENT_SETTING_BUBBLE_MODEL_H_ | 5 #ifndef CHROME_BROWSER_UI_CONTENT_SETTINGS_CONTENT_SETTING_BUBBLE_MODEL_H_ |
| 6 #define CHROME_BROWSER_UI_CONTENT_SETTINGS_CONTENT_SETTING_BUBBLE_MODEL_H_ | 6 #define CHROME_BROWSER_UI_CONTENT_SETTINGS_CONTENT_SETTING_BUBBLE_MODEL_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <map> | 10 #include <map> |
| (...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 253 DISALLOW_COPY_AND_ASSIGN(ContentSettingSimpleBubbleModel); | 253 DISALLOW_COPY_AND_ASSIGN(ContentSettingSimpleBubbleModel); |
| 254 }; | 254 }; |
| 255 | 255 |
| 256 // RPH stands for Register Protocol Handler. | 256 // RPH stands for Register Protocol Handler. |
| 257 class ContentSettingRPHBubbleModel : public ContentSettingSimpleBubbleModel { | 257 class ContentSettingRPHBubbleModel : public ContentSettingSimpleBubbleModel { |
| 258 public: | 258 public: |
| 259 ContentSettingRPHBubbleModel(Delegate* delegate, | 259 ContentSettingRPHBubbleModel(Delegate* delegate, |
| 260 content::WebContents* web_contents, | 260 content::WebContents* web_contents, |
| 261 Profile* profile, | 261 Profile* profile, |
| 262 ProtocolHandlerRegistry* registry); | 262 ProtocolHandlerRegistry* registry); |
| 263 ~ContentSettingRPHBubbleModel() override; |
| 263 | 264 |
| 264 void OnRadioClicked(int radio_index) override; | 265 void OnRadioClicked(int radio_index) override; |
| 265 void OnDoneClicked() override; | 266 void OnDoneClicked() override; |
| 266 | 267 |
| 267 private: | 268 private: |
| 268 void RegisterProtocolHandler(); | 269 void RegisterProtocolHandler(); |
| 269 void UnregisterProtocolHandler(); | 270 void UnregisterProtocolHandler(); |
| 270 void IgnoreProtocolHandler(); | 271 void IgnoreProtocolHandler(); |
| 271 void ClearOrSetPreviousHandler(); | 272 void ClearOrSetPreviousHandler(); |
| 272 | 273 |
| 273 int selected_item_; | 274 int selected_item_; |
| 275 // Initially false, set to true if the user explicitly interacts with the |
| 276 // bubble. |
| 277 bool interacted_; |
| 274 ProtocolHandlerRegistry* registry_; | 278 ProtocolHandlerRegistry* registry_; |
| 275 ProtocolHandler pending_handler_; | 279 ProtocolHandler pending_handler_; |
| 276 ProtocolHandler previous_handler_; | 280 ProtocolHandler previous_handler_; |
| 277 | 281 |
| 278 DISALLOW_COPY_AND_ASSIGN(ContentSettingRPHBubbleModel); | 282 DISALLOW_COPY_AND_ASSIGN(ContentSettingRPHBubbleModel); |
| 279 }; | 283 }; |
| 280 | 284 |
| 281 // The model of the content settings bubble for media settings. | 285 // The model of the content settings bubble for media settings. |
| 282 class ContentSettingMediaStreamBubbleModel : public ContentSettingBubbleModel { | 286 class ContentSettingMediaStreamBubbleModel : public ContentSettingBubbleModel { |
| 283 public: | 287 public: |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 328 // The content settings that are associated with the individual radio | 332 // The content settings that are associated with the individual radio |
| 329 // buttons. | 333 // buttons. |
| 330 ContentSetting radio_item_setting_[2]; | 334 ContentSetting radio_item_setting_[2]; |
| 331 // The state of the microphone and camera access. | 335 // The state of the microphone and camera access. |
| 332 TabSpecificContentSettings::MicrophoneCameraState state_; | 336 TabSpecificContentSettings::MicrophoneCameraState state_; |
| 333 | 337 |
| 334 DISALLOW_COPY_AND_ASSIGN(ContentSettingMediaStreamBubbleModel); | 338 DISALLOW_COPY_AND_ASSIGN(ContentSettingMediaStreamBubbleModel); |
| 335 }; | 339 }; |
| 336 | 340 |
| 337 #endif // CHROME_BROWSER_UI_CONTENT_SETTINGS_CONTENT_SETTING_BUBBLE_MODEL_H_ | 341 #endif // CHROME_BROWSER_UI_CONTENT_SETTINGS_CONTENT_SETTING_BUBBLE_MODEL_H_ |
| OLD | NEW |