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

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

Issue 2480813003: Reduce views::Border creation verbosity by promoting factory functions (Closed)
Patch Set: fix bad merge Created 4 years, 1 month 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
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/common/system/tray/system_tray_bubble.h" 5 #include "ash/common/system/tray/system_tray_bubble.h"
6 6
7 #include <utility> 7 #include <utility>
8 #include <vector> 8 #include <vector>
9 9
10 #include "ash/common/material_design/material_design_controller.h" 10 #include "ash/common/material_design/material_design_controller.h"
(...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after
343 } 343 }
344 } 344 }
345 345
346 if (!MaterialDesignController::IsSystemTrayMenuMaterial()) { 346 if (!MaterialDesignController::IsSystemTrayMenuMaterial()) {
347 // For default view, draw bottom border for each item, except the last 347 // For default view, draw bottom border for each item, except the last
348 // 2 items, which are the bottom header row and the one just above it. 348 // 2 items, which are the bottom header row and the one just above it.
349 if (is_default_bubble) { 349 if (is_default_bubble) {
350 const int last_item_with_border = 350 const int last_item_with_border =
351 static_cast<int>(item_containers.size()) - 2; 351 static_cast<int>(item_containers.size()) - 2;
352 for (int i = 0; i < last_item_with_border; ++i) { 352 for (int i = 0; i < last_item_with_border; ++i) {
353 item_containers.at(i)->SetBorder(views::Border::CreateSolidSidedBorder( 353 item_containers.at(i)->SetBorder(
354 0, 0, 1, 0, kBorderLightColor)); 354 views::CreateSolidSidedBorder(0, 0, 1, 0, kBorderLightColor));
355 } 355 }
356 } 356 }
357 } 357 }
358 358
359 if (focus_view) { 359 if (focus_view) {
360 tray_->ActivateBubble(); 360 tray_->ActivateBubble();
361 focus_view->RequestFocus(); 361 focus_view->RequestFocus();
362 } 362 }
363 } 363 }
364 364
365 } // namespace ash 365 } // namespace ash
OLDNEW
« no previous file with comments | « ash/common/system/tray/system_menu_button.cc ('k') | ash/common/system/tray/tray_background_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698