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

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

Issue 2725833003: Bug Fix: List Too Small When Sharing Tab Only (Closed)
Patch Set: Created 3 years, 9 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_finder.h" 9 #include "chrome/browser/ui/browser_finder.h"
10 #include "chrome/browser/ui/browser_window.h" 10 #include "chrome/browser/ui/browser_window.h"
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 0); // focus_rectangle_inset 162 0); // focus_rectangle_inset
163 163
164 views::ScrollView* tab_scroll_view = 164 views::ScrollView* tab_scroll_view =
165 views::ScrollView::CreateScrollViewWithBorder(); 165 views::ScrollView::CreateScrollViewWithBorder();
166 base::string16 tab_title_text = 166 base::string16 tab_title_text =
167 l10n_util::GetStringUTF16(IDS_DESKTOP_MEDIA_PICKER_SOURCE_TYPE_TAB); 167 l10n_util::GetStringUTF16(IDS_DESKTOP_MEDIA_PICKER_SOURCE_TYPE_TAB);
168 list_views_.push_back(new DesktopMediaListView( 168 list_views_.push_back(new DesktopMediaListView(
169 this, std::move(tab_list), kTabStyle, kTabStyle, tab_title_text)); 169 this, std::move(tab_list), kTabStyle, kTabStyle, tab_title_text));
170 170
171 tab_scroll_view->SetContents(list_views_.back()); 171 tab_scroll_view->SetContents(list_views_.back());
172 tab_scroll_view->ClipHeightTo(kTabStyle.item_size.height(), 172 tab_scroll_view->ClipHeightTo(kTabStyle.item_size.height() * 7,
msw 2017/03/01 19:00:03 Can you post some screenshots of before and after?
qiangchen 2017/03/01 20:59:42 Reduce it to 5. As 5 * tab height is almost 1 * wi
msw 2017/03/01 23:26:48 nit: I still think it might be better to use just
qiangchen 2017/03/03 16:39:32 Done.
173 kTabStyle.item_size.height() * 2); 173 kTabStyle.item_size.height() * 10);
174 tab_scroll_view->set_hide_horizontal_scrollbar(true); 174 tab_scroll_view->set_hide_horizontal_scrollbar(true);
175 tab_scroll_view->set_background( 175 tab_scroll_view->set_background(
176 views::Background::CreateSolidBackground(bg_color)); 176 views::Background::CreateSolidBackground(bg_color));
177 177
178 pane_->AddTab(tab_title_text, tab_scroll_view); 178 pane_->AddTab(tab_title_text, tab_scroll_view);
179 pane_->set_listener(this); 179 pane_->set_listener(this);
180 } 180 }
181 181
182 if (app_name == target_name) { 182 if (app_name == target_name) {
183 description_label_->SetText( 183 description_label_->SetText(
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after
444 // DesktopMediaPicker. 444 // DesktopMediaPicker.
445 content::BrowserThread::PostTask(content::BrowserThread::UI, FROM_HERE, 445 content::BrowserThread::PostTask(content::BrowserThread::UI, FROM_HERE,
446 base::Bind(callback_, source)); 446 base::Bind(callback_, source));
447 callback_.Reset(); 447 callback_.Reset();
448 } 448 }
449 449
450 // static 450 // static
451 std::unique_ptr<DesktopMediaPicker> DesktopMediaPicker::Create() { 451 std::unique_ptr<DesktopMediaPicker> DesktopMediaPicker::Create() {
452 return std::unique_ptr<DesktopMediaPicker>(new DesktopMediaPickerViews()); 452 return std::unique_ptr<DesktopMediaPicker>(new DesktopMediaPickerViews());
453 } 453 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698