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

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: one wrong conversion 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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 const base::string16& app_name, 57 const base::string16& app_name,
58 const base::string16& target_name, 58 const base::string16& target_name,
59 std::unique_ptr<DesktopMediaList> screen_list, 59 std::unique_ptr<DesktopMediaList> screen_list,
60 std::unique_ptr<DesktopMediaList> window_list, 60 std::unique_ptr<DesktopMediaList> window_list,
61 std::unique_ptr<DesktopMediaList> tab_list, 61 std::unique_ptr<DesktopMediaList> tab_list,
62 bool request_audio) 62 bool request_audio)
63 : parent_(parent), 63 : parent_(parent),
64 description_label_(new views::Label()), 64 description_label_(new views::Label()),
65 audio_share_checkbox_(nullptr), 65 audio_share_checkbox_(nullptr),
66 pane_(new views::TabbedPane()) { 66 pane_(new views::TabbedPane()) {
67 ChromeLayoutProvider* provider = ChromeLayoutProvider::Get(); 67 const ChromeLayoutProvider* provider = ChromeLayoutProvider::Get();
68 68
69 SetLayoutManager(new views::BoxLayout( 69 SetLayoutManager(new views::BoxLayout(
70 views::BoxLayout::kVertical, 70 views::BoxLayout::kVertical,
71 provider->GetDistanceMetric(DISTANCE_DIALOG_BUTTON_MARGIN), 71 provider->GetDistanceMetric(
72 provider->GetDistanceMetric(DISTANCE_PANEL_CONTENT_MARGIN), 72 views::DISTANCE_DIALOG_CONTENTS_HORIZONTAL_MARGIN),
73 provider->GetDistanceMetric(views::DISTANCE_RELATED_CONTROL_VERTICAL))); 73 provider->GetDistanceMetric(
74 views::DISTANCE_DIALOG_CONTENTS_VERTICAL_MARGIN),
75 provider->GetDistanceMetric(DISTANCE_RELATED_CONTROL_VERTICAL_SMALL)));
74 76
75 description_label_->SetMultiLine(true); 77 description_label_->SetMultiLine(true);
76 description_label_->SetHorizontalAlignment(gfx::ALIGN_LEFT); 78 description_label_->SetHorizontalAlignment(gfx::ALIGN_LEFT);
77 AddChildView(description_label_); 79 AddChildView(description_label_);
78 80
79 const SkColor bg_color = GetNativeTheme()->GetSystemColor( 81 const SkColor bg_color = GetNativeTheme()->GetSystemColor(
80 ui::NativeTheme::kColorId_DialogBackground); 82 ui::NativeTheme::kColorId_DialogBackground);
81 83
82 if (screen_list) { 84 if (screen_list) {
83 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
450 // DesktopMediaPicker. 452 // DesktopMediaPicker.
451 content::BrowserThread::PostTask(content::BrowserThread::UI, FROM_HERE, 453 content::BrowserThread::PostTask(content::BrowserThread::UI, FROM_HERE,
452 base::BindOnce(callback_, source)); 454 base::BindOnce(callback_, source));
453 callback_.Reset(); 455 callback_.Reset();
454 } 456 }
455 457
456 // static 458 // static
457 std::unique_ptr<DesktopMediaPicker> DesktopMediaPicker::Create() { 459 std::unique_ptr<DesktopMediaPicker> DesktopMediaPicker::Create() {
458 return std::unique_ptr<DesktopMediaPicker>(new DesktopMediaPickerViews()); 460 return std::unique_ptr<DesktopMediaPicker>(new DesktopMediaPickerViews());
459 } 461 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698