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

Unified Diff: ash/common/system/tray/system_tray_bubble.cc

Issue 2758433002: Remove pre-MD code from SystemTrayBubble. (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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/common/system/chromeos/audio/volume_view.cc ('k') | ash/common/system/tray/system_tray_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/common/system/tray/system_tray_bubble.cc
diff --git a/ash/common/system/tray/system_tray_bubble.cc b/ash/common/system/tray/system_tray_bubble.cc
index 75e6b04a7345fb8e23714b5876fea6082403a60c..97b78894306932a30b6d539bae6089f3d965a1fb 100644
--- a/ash/common/system/tray/system_tray_bubble.cc
+++ b/ash/common/system/tray/system_tray_bubble.cc
@@ -7,13 +7,11 @@
#include <utility>
#include <vector>
-#include "ash/common/material_design/material_design_controller.h"
#include "ash/common/system/tray/system_tray.h"
#include "ash/common/system/tray/system_tray_delegate.h"
#include "ash/common/system/tray/system_tray_item.h"
#include "ash/common/system/tray/tray_bubble_wrapper.h"
#include "ash/common/system/tray/tray_constants.h"
-#include "ash/common/system/tray/tray_popup_item_container.h"
#include "ash/common/wm_shell.h"
#include "base/metrics/histogram_macros.h"
#include "base/threading/thread_task_runner_handle.h"
@@ -295,12 +293,10 @@ void SystemTrayBubble::RecordVisibleRowMetrics() {
}
void SystemTrayBubble::UpdateBottomPadding() {
- if (bubble_type_ == BUBBLE_TYPE_DEFAULT &&
- MaterialDesignController::IsSystemTrayMenuMaterial()) {
+ if (bubble_type_ == BUBBLE_TYPE_DEFAULT)
bubble_view_->SetBottomPadding(kDefaultViewBottomPadding);
- } else {
+ else
bubble_view_->SetBottomPadding(0);
- }
}
void SystemTrayBubble::CreateItemViews(LoginStatus login_status) {
@@ -313,9 +309,7 @@ void SystemTrayBubble::CreateItemViews(LoginStatus login_status) {
login_status = LoginStatus::LOCKED;
}
- std::vector<TrayPopupItemContainer*> item_containers;
views::View* focus_view = nullptr;
- const bool is_default_bubble = bubble_type_ == BUBBLE_TYPE_DEFAULT;
for (size_t i = 0; i < items_.size(); ++i) {
views::View* item_view = nullptr;
switch (bubble_type_) {
@@ -329,27 +323,8 @@ void SystemTrayBubble::CreateItemViews(LoginStatus login_status) {
break;
}
if (item_view) {
- TrayPopupItemContainer* tray_popup_item_container =
- new TrayPopupItemContainer(
- item_view,
- is_default_bubble &&
- !MaterialDesignController::IsSystemTrayMenuMaterial());
- bubble_view_->AddChildView(tray_popup_item_container);
- item_containers.push_back(tray_popup_item_container);
- tray_item_view_map_[items_[i]->uma_type()] = tray_popup_item_container;
- }
- }
-
- if (!MaterialDesignController::IsSystemTrayMenuMaterial()) {
- // For default view, draw bottom border for each item, except the last
- // 2 items, which are the bottom header row and the one just above it.
- if (is_default_bubble) {
- const int last_item_with_border =
- static_cast<int>(item_containers.size()) - 2;
- for (int i = 0; i < last_item_with_border; ++i) {
- item_containers.at(i)->SetBorder(
- views::CreateSolidSidedBorder(0, 0, 1, 0, kBorderLightColor));
- }
+ bubble_view_->AddChildView(item_view);
+ tray_item_view_map_[items_[i]->uma_type()] = item_view;
}
}
« no previous file with comments | « ash/common/system/chromeos/audio/volume_view.cc ('k') | ash/common/system/tray/system_tray_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698