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

Side by Side Diff: chrome/browser/ui/views/desktop_media_picker_views.h

Issue 378273003: Add command-line flag for tests to bypass the screenshare window picker. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Using PostTask and weak pointers instead Created 6 years, 4 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_VIEWS_DESKTOP_MEDIA_PICKER_VIEWS_H_ 5 #ifndef CHROME_BROWSER_UI_VIEWS_DESKTOP_MEDIA_PICKER_VIEWS_H_
6 #define CHROME_BROWSER_UI_VIEWS_DESKTOP_MEDIA_PICKER_VIEWS_H_ 6 #define CHROME_BROWSER_UI_VIEWS_DESKTOP_MEDIA_PICKER_VIEWS_H_
7 7
8 #include "chrome/browser/media/desktop_media_list_observer.h" 8 #include "chrome/browser/media/desktop_media_list_observer.h"
9 #include "chrome/browser/media/desktop_media_picker.h" 9 #include "chrome/browser/media/desktop_media_picker.h"
10 #include "ui/views/window/dialog_delegate.h" 10 #include "ui/views/window/dialog_delegate.h"
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 private: 46 private:
47 // DesktopMediaList::Observer interface 47 // DesktopMediaList::Observer interface
48 virtual void OnSourceAdded(int index) OVERRIDE; 48 virtual void OnSourceAdded(int index) OVERRIDE;
49 virtual void OnSourceRemoved(int index) OVERRIDE; 49 virtual void OnSourceRemoved(int index) OVERRIDE;
50 virtual void OnSourceMoved(int old_index, int new_index) OVERRIDE; 50 virtual void OnSourceMoved(int old_index, int new_index) OVERRIDE;
51 virtual void OnSourceNameChanged(int index) OVERRIDE; 51 virtual void OnSourceNameChanged(int index) OVERRIDE;
52 virtual void OnSourceThumbnailChanged(int index) OVERRIDE; 52 virtual void OnSourceThumbnailChanged(int index) OVERRIDE;
53 53
54 DesktopMediaPickerDialogView* parent_; 54 DesktopMediaPickerDialogView* parent_;
55 scoped_ptr<DesktopMediaList> media_list_; 55 scoped_ptr<DesktopMediaList> media_list_;
56 base::WeakPtrFactory<DesktopMediaListView> weak_factory_;
56 57
57 DISALLOW_COPY_AND_ASSIGN(DesktopMediaListView); 58 DISALLOW_COPY_AND_ASSIGN(DesktopMediaListView);
58 }; 59 };
59 60
60 // View used for each item in DesktopMediaListView. Shows a single desktop media 61 // View used for each item in DesktopMediaListView. Shows a single desktop media
61 // source as a thumbnail with the title under it. 62 // source as a thumbnail with the title under it.
62 class DesktopMediaSourceView : public views::View { 63 class DesktopMediaSourceView : public views::View {
63 public: 64 public:
64 DesktopMediaSourceView(DesktopMediaListView* parent, 65 DesktopMediaSourceView(DesktopMediaListView* parent,
65 content::DesktopMediaID source_id); 66 content::DesktopMediaID source_id);
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 177
177 // The |dialog_| is owned by the corresponding views::Widget instance. 178 // The |dialog_| is owned by the corresponding views::Widget instance.
178 // When DesktopMediaPickerViews is destroyed the |dialog_| is destroyed 179 // When DesktopMediaPickerViews is destroyed the |dialog_| is destroyed
179 // asynchronously by closing the widget. 180 // asynchronously by closing the widget.
180 DesktopMediaPickerDialogView* dialog_; 181 DesktopMediaPickerDialogView* dialog_;
181 182
182 DISALLOW_COPY_AND_ASSIGN(DesktopMediaPickerViews); 183 DISALLOW_COPY_AND_ASSIGN(DesktopMediaPickerViews);
183 }; 184 };
184 185
185 #endif // CHROME_BROWSER_UI_VIEWS_DESKTOP_MEDIA_PICKER_VIEWS_H_ 186 #endif // CHROME_BROWSER_UI_VIEWS_DESKTOP_MEDIA_PICKER_VIEWS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698