OLD | NEW |
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 "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "chrome/browser/media/desktop_media_list.h" | 9 #include "chrome/browser/media/desktop_media_list.h" |
10 #include "chrome/browser/ui/browser_finder.h" | 10 #include "chrome/browser/ui/browser_finder.h" |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 pane_(new views::TabbedPane()) { | 68 pane_(new views::TabbedPane()) { |
69 SetLayoutManager(new views::BoxLayout( | 69 SetLayoutManager(new views::BoxLayout( |
70 views::BoxLayout::kVertical, views::kButtonHEdgeMarginNew, | 70 views::BoxLayout::kVertical, views::kButtonHEdgeMarginNew, |
71 views::kPanelVertMargin, views::kLabelToControlVerticalSpacing)); | 71 views::kPanelVertMargin, views::kLabelToControlVerticalSpacing)); |
72 | 72 |
73 description_label_->SetMultiLine(true); | 73 description_label_->SetMultiLine(true); |
74 description_label_->SetHorizontalAlignment(gfx::ALIGN_LEFT); | 74 description_label_->SetHorizontalAlignment(gfx::ALIGN_LEFT); |
75 AddChildView(description_label_); | 75 AddChildView(description_label_); |
76 | 76 |
77 const SkColor bg_color = GetNativeTheme()->GetSystemColor( | 77 const SkColor bg_color = GetNativeTheme()->GetSystemColor( |
78 ui::NativeTheme::kColorId_MenuBackgroundColor); | 78 ui::NativeTheme::kColorId_DialogBackground); |
79 | 79 |
80 if (screen_list) { | 80 if (screen_list) { |
81 source_types_.push_back(DesktopMediaID::TYPE_SCREEN); | 81 source_types_.push_back(DesktopMediaID::TYPE_SCREEN); |
82 | 82 |
83 const DesktopMediaSourceViewStyle kSingleScreenStyle( | 83 const DesktopMediaSourceViewStyle kSingleScreenStyle( |
84 1, // columns | 84 1, // columns |
85 gfx::Size(360, 280), // item_size | 85 gfx::Size(360, 280), // item_size |
86 gfx::Rect(), // icon_rect | 86 gfx::Rect(), // icon_rect |
87 gfx::Rect(), // label_rect | 87 gfx::Rect(), // label_rect |
88 gfx::HorizontalAlignment::ALIGN_CENTER, // text_alignment | 88 gfx::HorizontalAlignment::ALIGN_CENTER, // text_alignment |
(...skipping 356 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
445 | 445 |
446 // static | 446 // static |
447 std::unique_ptr<DesktopMediaPicker> DesktopMediaPicker::Create() { | 447 std::unique_ptr<DesktopMediaPicker> DesktopMediaPicker::Create() { |
448 if (base::CommandLine::ForCurrentProcess()->HasSwitch( | 448 if (base::CommandLine::ForCurrentProcess()->HasSwitch( |
449 extensions::switches::kDisableDesktopCapturePickerNewUI)) { | 449 extensions::switches::kDisableDesktopCapturePickerNewUI)) { |
450 return std::unique_ptr<DesktopMediaPicker>( | 450 return std::unique_ptr<DesktopMediaPicker>( |
451 new deprecated::DesktopMediaPickerViews()); | 451 new deprecated::DesktopMediaPickerViews()); |
452 } | 452 } |
453 return std::unique_ptr<DesktopMediaPicker>(new DesktopMediaPickerViews()); | 453 return std::unique_ptr<DesktopMediaPicker>(new DesktopMediaPickerViews()); |
454 } | 454 } |
OLD | NEW |