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

Side by Side Diff: chrome/browser/ui/views/desktop_capture/desktop_media_picker_views.cc

Issue 2888563004: Delete panel metrics and define insets in terms of distance metrics. (Closed)
Patch Set: edits 2 Created 3 years, 7 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 #include "chrome/browser/ui/views/desktop_capture/desktop_media_picker_views.h" 5 #include "chrome/browser/ui/views/desktop_capture/desktop_media_picker_views.h"
6 6
7 #include "base/callback.h" 7 #include "base/callback.h"
8 #include "chrome/browser/media/webrtc/desktop_media_list.h" 8 #include "chrome/browser/media/webrtc/desktop_media_list.h"
9 #include "chrome/browser/ui/browser_dialogs.h" 9 #include "chrome/browser/ui/browser_dialogs.h"
10 #include "chrome/browser/ui/browser_finder.h" 10 #include "chrome/browser/ui/browser_finder.h"
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 const base::string16& app_name, 58 const base::string16& app_name,
59 const base::string16& target_name, 59 const base::string16& target_name,
60 std::unique_ptr<DesktopMediaList> screen_list, 60 std::unique_ptr<DesktopMediaList> screen_list,
61 std::unique_ptr<DesktopMediaList> window_list, 61 std::unique_ptr<DesktopMediaList> window_list,
62 std::unique_ptr<DesktopMediaList> tab_list, 62 std::unique_ptr<DesktopMediaList> tab_list,
63 bool request_audio) 63 bool request_audio)
64 : parent_(parent), 64 : parent_(parent),
65 description_label_(new views::Label()), 65 description_label_(new views::Label()),
66 audio_share_checkbox_(nullptr), 66 audio_share_checkbox_(nullptr),
67 pane_(new views::TabbedPane()) { 67 pane_(new views::TabbedPane()) {
68 const ChromeLayoutProvider* provider = ChromeLayoutProvider::Get();
68 SetLayoutManager(new views::BoxLayout( 69 SetLayoutManager(new views::BoxLayout(
69 views::BoxLayout::kVertical, views::kButtonHEdgeMarginNew, 70 views::BoxLayout::kVertical,
70 ChromeLayoutProvider::Get()->GetDistanceMetric( 71 provider->GetDistanceMetric(
71 DISTANCE_PANEL_CONTENT_MARGIN), 72 views::DISTANCE_DIALOG_CONTENTS_HORIZONTAL_MARGIN),
72 views::kLabelToControlVerticalSpacing)); 73 provider->GetDistanceMetric(
74 views::DISTANCE_DIALOG_CONTENTS_VERTICAL_MARGIN),
75 provider->GetDistanceMetric(DISTANCE_RELATED_CONTROL_HORIZONTAL_SMALL)));
Peter Kasting 2017/05/18 00:00:06 This doesn't seem right, you've gone from a vertic
Bret 2017/05/18 00:50:05 Oops, done.
73 76
74 description_label_->SetMultiLine(true); 77 description_label_->SetMultiLine(true);
75 description_label_->SetHorizontalAlignment(gfx::ALIGN_LEFT); 78 description_label_->SetHorizontalAlignment(gfx::ALIGN_LEFT);
76 AddChildView(description_label_); 79 AddChildView(description_label_);
77 80
78 const SkColor bg_color = GetNativeTheme()->GetSystemColor( 81 const SkColor bg_color = GetNativeTheme()->GetSystemColor(
79 ui::NativeTheme::kColorId_DialogBackground); 82 ui::NativeTheme::kColorId_DialogBackground);
80 83
81 if (screen_list) { 84 if (screen_list) {
82 source_types_.push_back(DesktopMediaID::TYPE_SCREEN); 85 source_types_.push_back(DesktopMediaID::TYPE_SCREEN);
(...skipping 366 matching lines...) Expand 10 before | Expand all | Expand 10 after
449 // DesktopMediaPicker. 452 // DesktopMediaPicker.
450 content::BrowserThread::PostTask(content::BrowserThread::UI, FROM_HERE, 453 content::BrowserThread::PostTask(content::BrowserThread::UI, FROM_HERE,
451 base::BindOnce(callback_, source)); 454 base::BindOnce(callback_, source));
452 callback_.Reset(); 455 callback_.Reset();
453 } 456 }
454 457
455 // static 458 // static
456 std::unique_ptr<DesktopMediaPicker> DesktopMediaPicker::Create() { 459 std::unique_ptr<DesktopMediaPicker> DesktopMediaPicker::Create() {
457 return std::unique_ptr<DesktopMediaPicker>(new DesktopMediaPickerViews()); 460 return std::unique_ptr<DesktopMediaPicker>(new DesktopMediaPickerViews());
458 } 461 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698