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

Side by Side Diff: ash/system/tray/system_tray_bubble.cc

Issue 145033006: views: Make View::set_border() take a scoped_ptr<>. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase to ToT Created 6 years, 11 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 | « ash/system/tray/special_popup_row.cc ('k') | ash/system/tray/tray_background_view.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "ash/system/tray/system_tray_bubble.h" 5 #include "ash/system/tray/system_tray_bubble.h"
6 6
7 #include "ash/shell.h" 7 #include "ash/shell.h"
8 #include "ash/system/tray/system_tray.h" 8 #include "ash/system/tray/system_tray.h"
9 #include "ash/system/tray/system_tray_delegate.h" 9 #include "ash/system/tray/system_tray_delegate.h"
10 #include "ash/system/tray/system_tray_item.h" 10 #include "ash/system/tray/system_tray_item.h"
(...skipping 30 matching lines...) Expand all
41 // - optionally changes background color on hover. 41 // - optionally changes background color on hover.
42 class TrayPopupItemContainer : public views::View { 42 class TrayPopupItemContainer : public views::View {
43 public: 43 public:
44 TrayPopupItemContainer(views::View* view, 44 TrayPopupItemContainer(views::View* view,
45 bool change_background, 45 bool change_background,
46 bool draw_border) 46 bool draw_border)
47 : hover_(false), 47 : hover_(false),
48 change_background_(change_background) { 48 change_background_(change_background) {
49 set_notify_enter_exit_on_child(true); 49 set_notify_enter_exit_on_child(true);
50 if (draw_border) { 50 if (draw_border) {
51 set_border( 51 SetBorder(
52 views::Border::CreateSolidSidedBorder(0, 0, 1, 0, kBorderLightColor)); 52 views::Border::CreateSolidSidedBorder(0, 0, 1, 0, kBorderLightColor));
53 } 53 }
54 views::BoxLayout* layout = new views::BoxLayout( 54 views::BoxLayout* layout = new views::BoxLayout(
55 views::BoxLayout::kVertical, 0, 0, 0); 55 views::BoxLayout::kVertical, 0, 0, 0);
56 layout->set_spread_blank_space(true); 56 layout->set_spread_blank_space(true);
57 SetLayoutManager(layout); 57 SetLayoutManager(layout);
58 SetPaintToLayer(view->layer() != NULL); 58 SetPaintToLayer(view->layer() != NULL);
59 if (view->layer()) 59 if (view->layer())
60 SetFillsBoundsOpaquely(view->layer()->fills_bounds_opaquely()); 60 SetFillsBoundsOpaquely(view->layer()->fills_bounds_opaquely());
61 AddChildView(view); 61 AddChildView(view);
(...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after
379 bubble_view_->AddChildView(new TrayPopupItemContainer( 379 bubble_view_->AddChildView(new TrayPopupItemContainer(
380 item_views[i], is_default_bubble, 380 item_views[i], is_default_bubble,
381 is_default_bubble && (i < item_views.size() - 2))); 381 is_default_bubble && (i < item_views.size() - 2)));
382 } 382 }
383 if (focus_view) 383 if (focus_view)
384 focus_view->RequestFocus(); 384 focus_view->RequestFocus();
385 } 385 }
386 386
387 } // namespace internal 387 } // namespace internal
388 } // namespace ash 388 } // namespace ash
OLDNEW
« no previous file with comments | « ash/system/tray/special_popup_row.cc ('k') | ash/system/tray/tray_background_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698