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

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

Issue 1880693002: Desktop Capture Picker New UI: Preliminary Refactor (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Nit Created 4 years, 8 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 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 "base/macros.h" 8 #include "base/macros.h"
9 #include "chrome/browser/media/desktop_media_list_observer.h" 9 #include "chrome/browser/media/desktop_media_list_observer.h"
10 #include "chrome/browser/media/desktop_media_picker.h" 10 #include "chrome/browser/media/desktop_media_picker.h"
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 }; 112 };
113 113
114 // Dialog view used for DesktopMediaPickerViews. 114 // Dialog view used for DesktopMediaPickerViews.
115 class DesktopMediaPickerDialogView : public views::DialogDelegateView { 115 class DesktopMediaPickerDialogView : public views::DialogDelegateView {
116 public: 116 public:
117 DesktopMediaPickerDialogView(content::WebContents* parent_web_contents, 117 DesktopMediaPickerDialogView(content::WebContents* parent_web_contents,
118 gfx::NativeWindow context, 118 gfx::NativeWindow context,
119 DesktopMediaPickerViews* parent, 119 DesktopMediaPickerViews* parent,
120 const base::string16& app_name, 120 const base::string16& app_name,
121 const base::string16& target_name, 121 const base::string16& target_name,
122 std::unique_ptr<DesktopMediaList> media_list, 122 std::unique_ptr<DesktopMediaList> screen_list,
123 std::unique_ptr<DesktopMediaList> window_list,
124 std::unique_ptr<DesktopMediaList> tab_list,
123 bool request_audio); 125 bool request_audio);
124 ~DesktopMediaPickerDialogView() override; 126 ~DesktopMediaPickerDialogView() override;
125 127
126 // Called by parent (DesktopMediaPickerViews) when it's destroyed. 128 // Called by parent (DesktopMediaPickerViews) when it's destroyed.
127 void DetachParent(); 129 void DetachParent();
128 130
129 // Called by DesktopMediaListView. 131 // Called by DesktopMediaListView.
130 void OnSelectionChanged(); 132 void OnSelectionChanged();
131 void OnDoubleClick(); 133 void OnDoubleClick();
132 134
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 ~DesktopMediaPickerViews() override; 173 ~DesktopMediaPickerViews() override;
172 174
173 void NotifyDialogResult(content::DesktopMediaID source); 175 void NotifyDialogResult(content::DesktopMediaID source);
174 176
175 // DesktopMediaPicker overrides. 177 // DesktopMediaPicker overrides.
176 void Show(content::WebContents* web_contents, 178 void Show(content::WebContents* web_contents,
177 gfx::NativeWindow context, 179 gfx::NativeWindow context,
178 gfx::NativeWindow parent, 180 gfx::NativeWindow parent,
179 const base::string16& app_name, 181 const base::string16& app_name,
180 const base::string16& target_name, 182 const base::string16& target_name,
181 std::unique_ptr<DesktopMediaList> media_list, 183 std::unique_ptr<DesktopMediaList> screen_list,
184 std::unique_ptr<DesktopMediaList> window_list,
185 std::unique_ptr<DesktopMediaList> tab_list,
182 bool request_audio, 186 bool request_audio,
183 const DoneCallback& done_callback) override; 187 const DoneCallback& done_callback) override;
184 188
185 DesktopMediaPickerDialogView* GetDialogViewForTesting() const { 189 DesktopMediaPickerDialogView* GetDialogViewForTesting() const {
186 return dialog_; 190 return dialog_;
187 } 191 }
188 192
189 private: 193 private:
190 DoneCallback callback_; 194 DoneCallback callback_;
191 195
192 // The |dialog_| is owned by the corresponding views::Widget instance. 196 // The |dialog_| is owned by the corresponding views::Widget instance.
193 // When DesktopMediaPickerViews is destroyed the |dialog_| is destroyed 197 // When DesktopMediaPickerViews is destroyed the |dialog_| is destroyed
194 // asynchronously by closing the widget. 198 // asynchronously by closing the widget.
195 DesktopMediaPickerDialogView* dialog_; 199 DesktopMediaPickerDialogView* dialog_;
196 200
197 DISALLOW_COPY_AND_ASSIGN(DesktopMediaPickerViews); 201 DISALLOW_COPY_AND_ASSIGN(DesktopMediaPickerViews);
198 }; 202 };
199 203
200 #endif // CHROME_BROWSER_UI_VIEWS_DESKTOP_MEDIA_PICKER_VIEWS_H_ 204 #endif // CHROME_BROWSER_UI_VIEWS_DESKTOP_MEDIA_PICKER_VIEWS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698