Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2715)

Side by Side Diff: chrome/browser/ui/cocoa/media_picker/desktop_media_picker_bridge.h

Issue 1622733002: Add CombinedDesktopMediaList class (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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_COCOA_MEDIA_PICKER_DESKTOP_MEDIA_PICKER_BRIDGE_H_ 5 #ifndef CHROME_BROWSER_UI_COCOA_MEDIA_PICKER_DESKTOP_MEDIA_PICKER_BRIDGE_H_
6 #define CHROME_BROWSER_UI_COCOA_MEDIA_PICKER_DESKTOP_MEDIA_PICKER_BRIDGE_H_ 6 #define CHROME_BROWSER_UI_COCOA_MEDIA_PICKER_DESKTOP_MEDIA_PICKER_BRIDGE_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "chrome/browser/media/desktop_media_list.h"
9 #include "chrome/browser/media/desktop_media_list_observer.h" 10 #include "chrome/browser/media/desktop_media_list_observer.h"
10 11
11 // Protocol corresponding to |DesktopMediaListObserver|. 12 // Protocol corresponding to |DesktopMediaListObserver|.
12 @protocol DesktopMediaPickerObserver 13 @protocol DesktopMediaPickerObserver
13 - (void)sourceAddedAtIndex:(int)index; 14 - (void)sourceAddedAtIndex:(int)index;
14 - (void)sourceRemovedAtIndex:(int)index; 15 - (void)sourceRemovedAtIndex:(int)index;
15 - (void)sourceMovedFrom:(int)oldIndex to:(int)newIndex; 16 - (void)sourceMovedFrom:(int)oldIndex to:(int)newIndex;
16 - (void)sourceNameChangedAtIndex:(int)index; 17 - (void)sourceNameChangedAtIndex:(int)index;
17 - (void)sourceThumbnailChangedAtIndex:(int)index; 18 - (void)sourceThumbnailChangedAtIndex:(int)index;
18 @end 19 @end
19 20
20 // Provides a |DesktopMediaListObserver| implementation that forwards 21 // Provides a |DesktopMediaListObserver| implementation that forwards
21 // notifications to a objective-c object implementing the 22 // notifications to a objective-c object implementing the
22 // |DesktopMediaPickerObserver| protocol. 23 // |DesktopMediaPickerObserver| protocol.
23 class DesktopMediaPickerBridge : public DesktopMediaListObserver { 24 class DesktopMediaPickerBridge : public DesktopMediaListObserver {
24 public: 25 public:
25 DesktopMediaPickerBridge(id<DesktopMediaPickerObserver> observer); 26 DesktopMediaPickerBridge(id<DesktopMediaPickerObserver> observer);
26 ~DesktopMediaPickerBridge() override; 27 ~DesktopMediaPickerBridge() override;
27 28
28 // DesktopMediaListObserver overrides. 29 // DesktopMediaListObserver overrides.
29 void OnSourceAdded(int index) override; 30 void OnSourceAdded(DesktopMediaList* list, int index) override;
30 void OnSourceRemoved(int index) override; 31 void OnSourceRemoved(DesktopMediaList* list, int index) override;
31 void OnSourceMoved(int old_index, int new_index) override; 32 void OnSourceMoved(DesktopMediaList* list,
32 void OnSourceNameChanged(int index) override; 33 int old_index,
33 void OnSourceThumbnailChanged(int index) override; 34 int new_index) override;
35 void OnSourceNameChanged(DesktopMediaList* list, int index) override;
36 void OnSourceThumbnailChanged(DesktopMediaList* list, int index) override;
34 37
35 private: 38 private:
36 id<DesktopMediaPickerObserver> observer_; // weak; owns this 39 id<DesktopMediaPickerObserver> observer_; // weak; owns this
37 40
38 DISALLOW_COPY_AND_ASSIGN(DesktopMediaPickerBridge); 41 DISALLOW_COPY_AND_ASSIGN(DesktopMediaPickerBridge);
39 }; 42 };
40 43
41 #endif // CHROME_BROWSER_UI_COCOA_MEDIA_PICKER_DESKTOP_MEDIA_PICKER_BRIDGE_H_ 44 #endif // CHROME_BROWSER_UI_COCOA_MEDIA_PICKER_DESKTOP_MEDIA_PICKER_BRIDGE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698