| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_MEDIA_MENU_MODEL_H_ | 5 #ifndef CHROME_BROWSER_UI_CONTENT_SETTINGS_CONTENT_SETTING_MEDIA_MENU_MODEL_H_ |
| 6 #define CHROME_BROWSER_UI_CONTENT_SETTINGS_CONTENT_SETTING_MEDIA_MENU_MODEL_H_ | 6 #define CHROME_BROWSER_UI_CONTENT_SETTINGS_CONTENT_SETTING_MEDIA_MENU_MODEL_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 | 9 |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| 11 #include "base/macros.h" | 11 #include "base/macros.h" |
| 12 #include "content/public/common/media_stream_request.h" | 12 #include "content/public/common/media_stream_request.h" |
| 13 #include "ui/base/models/simple_menu_model.h" | 13 #include "ui/base/models/simple_menu_model.h" |
| 14 | 14 |
| 15 class ContentSettingBubbleModel; | 15 class ContentSettingBubbleModel; |
| 16 | 16 |
| 17 // A menu model that builds the contents of the media capture devices menu in | 17 // A menu model that builds the contents of the media capture devices menu in |
| 18 // the content setting bubble. | 18 // the content setting bubble. |
| 19 // DEPRECATED: only used on OSX. Port OSX to |
| 20 // ContentSettingBubbleContents::MediaComboboxModel. See crbug.com/590850 |
| 19 class ContentSettingMediaMenuModel : public ui::SimpleMenuModel, | 21 class ContentSettingMediaMenuModel : public ui::SimpleMenuModel, |
| 20 public ui::SimpleMenuModel::Delegate { | 22 public ui::SimpleMenuModel::Delegate { |
| 21 public: | 23 public: |
| 22 // Callback to update the label of the menu in the UI. | 24 // Callback to update the label of the menu in the UI. |
| 23 typedef base::Callback<void(content::MediaStreamType, const std::string&)> | 25 typedef base::Callback<void(content::MediaStreamType, const std::string&)> |
| 24 MenuLabelChangedCallback; | 26 MenuLabelChangedCallback; |
| 25 | 27 |
| 26 ContentSettingMediaMenuModel( | 28 ContentSettingMediaMenuModel( |
| 27 content::MediaStreamType type, | 29 content::MediaStreamType type, |
| 28 ContentSettingBubbleModel* bubble_model, | 30 ContentSettingBubbleModel* bubble_model, |
| (...skipping 12 matching lines...) Expand all Loading... |
| 41 | 43 |
| 42 content::MediaStreamType type_; | 44 content::MediaStreamType type_; |
| 43 ContentSettingBubbleModel* media_bubble_model_; // Weak. | 45 ContentSettingBubbleModel* media_bubble_model_; // Weak. |
| 44 MenuLabelChangedCallback callback_; | 46 MenuLabelChangedCallback callback_; |
| 45 CommandMap commands_; | 47 CommandMap commands_; |
| 46 | 48 |
| 47 DISALLOW_COPY_AND_ASSIGN(ContentSettingMediaMenuModel); | 49 DISALLOW_COPY_AND_ASSIGN(ContentSettingMediaMenuModel); |
| 48 }; | 50 }; |
| 49 | 51 |
| 50 #endif // CHROME_BROWSER_UI_CONTENT_SETTINGS_CONTENT_SETTING_MEDIA_MENU_MODEL_H
_ | 52 #endif // CHROME_BROWSER_UI_CONTENT_SETTINGS_CONTENT_SETTING_MEDIA_MENU_MODEL_H
_ |
| OLD | NEW |