| 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 <map> | 5 #include <map> |
| 6 | 6 |
| 7 #import <Cocoa/Cocoa.h> | 7 #import <Cocoa/Cocoa.h> |
| 8 | 8 |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #import "chrome/browser/ui/cocoa/base_bubble_controller.h" | 10 #import "chrome/browser/ui/cocoa/base_bubble_controller.h" |
| (...skipping 22 matching lines...) Expand all Loading... |
| 33 content::MediaStreamType type; | 33 content::MediaStreamType type; |
| 34 NSTextField* label; // Weak. | 34 NSTextField* label; // Weak. |
| 35 scoped_ptr<ContentSettingMediaMenuModel> model; | 35 scoped_ptr<ContentSettingMediaMenuModel> model; |
| 36 | 36 |
| 37 private: | 37 private: |
| 38 DISALLOW_COPY_AND_ASSIGN(MediaMenuParts); | 38 DISALLOW_COPY_AND_ASSIGN(MediaMenuParts); |
| 39 }; | 39 }; |
| 40 | 40 |
| 41 // Comparator used by MediaMenuPartsMap to order its keys. | 41 // Comparator used by MediaMenuPartsMap to order its keys. |
| 42 struct compare_button { | 42 struct compare_button { |
| 43 bool operator()(NSPopUpButton *const a, NSPopUpButton *const b) { | 43 bool operator()(NSPopUpButton *const a, NSPopUpButton *const b) const { |
| 44 return [a tag] < [b tag]; | 44 return [a tag] < [b tag]; |
| 45 } | 45 } |
| 46 }; | 46 }; |
| 47 typedef std::map<NSPopUpButton*, MediaMenuParts*, compare_button> | 47 typedef std::map<NSPopUpButton*, MediaMenuParts*, compare_button> |
| 48 MediaMenuPartsMap; | 48 MediaMenuPartsMap; |
| 49 } // namespace content_setting_bubble | 49 } // namespace content_setting_bubble |
| 50 | 50 |
| 51 // Manages a "content blocked" bubble. | 51 // Manages a "content blocked" bubble. |
| 52 @interface ContentSettingBubbleController : BaseBubbleController { | 52 @interface ContentSettingBubbleController : BaseBubbleController { |
| 53 @private | 53 @private |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 99 - (IBAction)mediaMenuChanged:(id)sender; | 99 - (IBAction)mediaMenuChanged:(id)sender; |
| 100 | 100 |
| 101 @end | 101 @end |
| 102 | 102 |
| 103 @interface ContentSettingBubbleController (TestingAPI) | 103 @interface ContentSettingBubbleController (TestingAPI) |
| 104 | 104 |
| 105 // Returns the weak reference to the |mediaMenus_|. | 105 // Returns the weak reference to the |mediaMenus_|. |
| 106 - (content_setting_bubble::MediaMenuPartsMap*)mediaMenus; | 106 - (content_setting_bubble::MediaMenuPartsMap*)mediaMenus; |
| 107 | 107 |
| 108 @end | 108 @end |
| OLD | NEW |