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

Side by Side Diff: athena/main/debug/network_selector.cc

Issue 428583003: athena: Use overlay scrollbars. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « athena/main/athena_main.gyp ('k') | 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "athena/main/debug/network_selector.h" 5 #include "athena/main/debug/network_selector.h"
6 6
7 #include "base/memory/weak_ptr.h" 7 #include "base/memory/weak_ptr.h"
8 #include "base/strings/utf_string_conversions.h" 8 #include "base/strings/utf_string_conversions.h"
9 #include "chromeos/network/network_configuration_handler.h" 9 #include "chromeos/network/network_configuration_handler.h"
10 #include "chromeos/network/network_connection_handler.h" 10 #include "chromeos/network/network_connection_handler.h"
(...skipping 15 matching lines...) Expand all
26 #include "ui/gfx/font_list.h" 26 #include "ui/gfx/font_list.h"
27 #include "ui/gfx/geometry/rect.h" 27 #include "ui/gfx/geometry/rect.h"
28 #include "ui/gfx/text_constants.h" 28 #include "ui/gfx/text_constants.h"
29 #include "ui/views/background.h" 29 #include "ui/views/background.h"
30 #include "ui/views/border.h" 30 #include "ui/views/border.h"
31 #include "ui/views/controls/button/blue_button.h" 31 #include "ui/views/controls/button/blue_button.h"
32 #include "ui/views/controls/button/button.h" 32 #include "ui/views/controls/button/button.h"
33 #include "ui/views/controls/image_view.h" 33 #include "ui/views/controls/image_view.h"
34 #include "ui/views/controls/label.h" 34 #include "ui/views/controls/label.h"
35 #include "ui/views/controls/scroll_view.h" 35 #include "ui/views/controls/scroll_view.h"
36 #include "ui/views/controls/scrollbar/overlay_scroll_bar.h"
36 #include "ui/views/controls/textfield/textfield.h" 37 #include "ui/views/controls/textfield/textfield.h"
37 #include "ui/views/layout/box_layout.h" 38 #include "ui/views/layout/box_layout.h"
38 #include "ui/views/layout/fill_layout.h" 39 #include "ui/views/layout/fill_layout.h"
39 #include "ui/views/widget/widget.h" 40 #include "ui/views/widget/widget.h"
40 41
41 using chromeos::NetworkConfigurationHandler; 42 using chromeos::NetworkConfigurationHandler;
42 using chromeos::NetworkConnectionHandler; 43 using chromeos::NetworkConnectionHandler;
43 using chromeos::NetworkHandler; 44 using chromeos::NetworkHandler;
44 using chromeos::NetworkProfileHandler; 45 using chromeos::NetworkProfileHandler;
45 using chromeos::NetworkState; 46 using chromeos::NetworkState;
(...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after
369 scroller_->set_background( 370 scroller_->set_background(
370 views::Background::CreateSolidBackground(SK_ColorWHITE)); 371 views::Background::CreateSolidBackground(SK_ColorWHITE));
371 scroller_->SetBounds(0, 0, 400, kListHeight); 372 scroller_->SetBounds(0, 0, 400, kListHeight);
372 373
373 scroll_content_ = new views::View; 374 scroll_content_ = new views::View;
374 scroll_content_->SetLayoutManager( 375 scroll_content_->SetLayoutManager(
375 new views::BoxLayout(views::BoxLayout::kVertical, 0, 0, 0)); 376 new views::BoxLayout(views::BoxLayout::kVertical, 0, 0, 0));
376 scroller_->SetContents(scroll_content_); 377 scroller_->SetContents(scroll_content_);
377 378
378 scroller_->ClipHeightTo(kListHeight, kListHeight); 379 scroller_->ClipHeightTo(kListHeight, kListHeight);
380 scroller_->SetVerticalScrollBar(new views::OverlayScrollBar(false));
379 background_view_->AddChildView(scroller_); 381 background_view_->AddChildView(scroller_);
380 382
381 background_view_->Layout(); 383 background_view_->Layout();
382 384
383 network_list_.set_content_view(scroll_content_); 385 network_list_.set_content_view(scroll_content_);
384 } 386 }
385 387
386 void UpdateNetworkList() { network_list_.UpdateNetworkList(); } 388 void UpdateNetworkList() { network_list_.UpdateNetworkList(); }
387 389
388 void Close() { delete this; } 390 void Close() { delete this; }
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
458 460
459 } // namespace 461 } // namespace
460 462
461 namespace debug { 463 namespace debug {
462 464
463 void CreateNetworkSelector(aura::Window* container) { 465 void CreateNetworkSelector(aura::Window* container) {
464 new NetworkSelector(container); 466 new NetworkSelector(container);
465 } 467 }
466 468
467 } // namespace debug 469 } // namespace debug
OLDNEW
« no previous file with comments | « athena/main/athena_main.gyp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698