| 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(), // label_rect | 86 gfx::Rect(), // label_rect |
| 87 gfx::HorizontalAlignment::ALIGN_CENTER, // text_alignment | 87 gfx::HorizontalAlignment::ALIGN_CENTER, // text_alignment |
| 88 gfx::Rect(20, 20, 320, 240), // image_rect | 88 gfx::Rect(20, 20, 320, 240), // image_rect |
| (...skipping 352 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 441 | 441 |
| 442 // static | 442 // static |
| 443 std::unique_ptr<DesktopMediaPicker> DesktopMediaPicker::Create() { | 443 std::unique_ptr<DesktopMediaPicker> DesktopMediaPicker::Create() { |
| 444 if (base::CommandLine::ForCurrentProcess()->HasSwitch( | 444 if (base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 445 extensions::switches::kDisableDesktopCapturePickerNewUI)) { | 445 extensions::switches::kDisableDesktopCapturePickerNewUI)) { |
| 446 return std::unique_ptr<DesktopMediaPicker>( | 446 return std::unique_ptr<DesktopMediaPicker>( |
| 447 new deprecated::DesktopMediaPickerViews()); | 447 new deprecated::DesktopMediaPickerViews()); |
| 448 } | 448 } |
| 449 return std::unique_ptr<DesktopMediaPicker>(new DesktopMediaPickerViews()); | 449 return std::unique_ptr<DesktopMediaPicker>(new DesktopMediaPickerViews()); |
| 450 } | 450 } |
| OLD | NEW |