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

Side by Side Diff: ash/common/system/chromeos/ime_menu/ime_menu_tray.cc

Issue 2147143002: [Chrome OS MD] Draw a 1px separator between 2 tray items (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address nits Created 4 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
« no previous file with comments | « ash/common/shelf/wm_shelf.cc ('k') | ash/common/system/chromeos/session/logout_button_tray.cc » ('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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/chromeos/ime_menu/ime_menu_tray.h" 5 #include "ash/common/system/chromeos/ime_menu/ime_menu_tray.h"
6 6
7 #include "ash/common/material_design/material_design_controller.h"
7 #include "ash/common/session/session_state_delegate.h" 8 #include "ash/common/session/session_state_delegate.h"
8 #include "ash/common/shelf/wm_shelf_util.h" 9 #include "ash/common/shelf/wm_shelf_util.h"
9 #include "ash/common/shell_window_ids.h" 10 #include "ash/common/shell_window_ids.h"
10 #include "ash/common/system/chromeos/ime_menu/ime_list_view.h" 11 #include "ash/common/system/chromeos/ime_menu/ime_list_view.h"
11 #include "ash/common/system/tray/system_tray_delegate.h" 12 #include "ash/common/system/tray/system_tray_delegate.h"
12 #include "ash/common/system/tray/system_tray_notifier.h" 13 #include "ash/common/system/tray/system_tray_notifier.h"
13 #include "ash/common/system/tray/tray_constants.h" 14 #include "ash/common/system/tray/tray_constants.h"
14 #include "ash/common/system/tray/tray_popup_header_button.h" 15 #include "ash/common/system/tray/tray_popup_header_button.h"
15 #include "ash/common/system/tray/tray_utils.h" 16 #include "ash/common/system/tray/tray_utils.h"
16 #include "ash/common/wm_lookup.h" 17 #include "ash/common/wm_lookup.h"
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 SetContentsBackground(); 145 SetContentsBackground();
145 WmShell::Get()->system_tray_notifier()->AddIMEObserver(this); 146 WmShell::Get()->system_tray_notifier()->AddIMEObserver(this);
146 } 147 }
147 148
148 ImeMenuTray::~ImeMenuTray() { 149 ImeMenuTray::~ImeMenuTray() {
149 WmShell::Get()->system_tray_notifier()->RemoveIMEObserver(this); 150 WmShell::Get()->system_tray_notifier()->RemoveIMEObserver(this);
150 } 151 }
151 152
152 void ImeMenuTray::SetShelfAlignment(ShelfAlignment alignment) { 153 void ImeMenuTray::SetShelfAlignment(ShelfAlignment alignment) {
153 TrayBackgroundView::SetShelfAlignment(alignment); 154 TrayBackgroundView::SetShelfAlignment(alignment);
154 tray_container()->SetBorder(views::Border::NullBorder()); 155 if (!ash::MaterialDesignController::IsShelfMaterial())
156 tray_container()->SetBorder(views::Border::NullBorder());
155 } 157 }
156 158
157 base::string16 ImeMenuTray::GetAccessibleNameForTray() { 159 base::string16 ImeMenuTray::GetAccessibleNameForTray() {
158 return l10n_util::GetStringUTF16(IDS_ASH_IME_MENU_ACCESSIBLE_NAME); 160 return l10n_util::GetStringUTF16(IDS_ASH_IME_MENU_ACCESSIBLE_NAME);
159 } 161 }
160 162
161 void ImeMenuTray::HideBubbleWithView(const views::TrayBubbleView* bubble_view) { 163 void ImeMenuTray::HideBubbleWithView(const views::TrayBubbleView* bubble_view) {
162 if (bubble_->bubble_view() == bubble_view) 164 if (bubble_->bubble_view() == bubble_view)
163 HideImeMenuBubble(); 165 HideImeMenuBubble();
164 } 166 }
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
272 bubble_.reset(new ash::TrayBubbleWrapper(this, bubble_view)); 274 bubble_.reset(new ash::TrayBubbleWrapper(this, bubble_view));
273 SetDrawBackgroundAsActive(true); 275 SetDrawBackgroundAsActive(true);
274 } 276 }
275 277
276 void ImeMenuTray::HideImeMenuBubble() { 278 void ImeMenuTray::HideImeMenuBubble() {
277 bubble_.reset(); 279 bubble_.reset();
278 SetDrawBackgroundAsActive(false); 280 SetDrawBackgroundAsActive(false);
279 } 281 }
280 282
281 } // namespace ash 283 } // namespace ash
OLDNEW
« no previous file with comments | « ash/common/shelf/wm_shelf.cc ('k') | ash/common/system/chromeos/session/logout_button_tray.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698