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

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

Issue 1469733003: system tray ui change for AllowOnlyPolicyNetworksToConnect (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix shared build Created 5 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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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/hover_highlight_view.h" 5 #include "ash/system/tray/hover_highlight_view.h"
6 6
7 #include "ash/system/tray/fixed_sized_image_view.h" 7 #include "ash/system/tray/fixed_sized_image_view.h"
8 #include "ash/system/tray/tray_constants.h" 8 #include "ash/system/tray/tray_constants.h"
9 #include "ash/system/tray/view_click_listener.h" 9 #include "ash/system/tray/view_click_listener.h"
10 #include "ui/accessibility/ax_view_state.h" 10 #include "ui/accessibility/ax_view_state.h"
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after
233 233
234 void HoverHighlightView::OnPaintBackground(gfx::Canvas* canvas) { 234 void HoverHighlightView::OnPaintBackground(gfx::Canvas* canvas) {
235 canvas->DrawColor(hover_ ? highlight_color_ : default_color_); 235 canvas->DrawColor(hover_ ? highlight_color_ : default_color_);
236 } 236 }
237 237
238 void HoverHighlightView::OnFocus() { 238 void HoverHighlightView::OnFocus() {
239 ScrollRectToVisible(gfx::Rect(gfx::Point(), size())); 239 ScrollRectToVisible(gfx::Rect(gfx::Point(), size()));
240 ActionableView::OnFocus(); 240 ActionableView::OnFocus();
241 } 241 }
242 242
243 bool HoverHighlightView::GetTooltipText(const gfx::Point& p,
244 base::string16* tooltip) const {
245 if (tooltip_.length()) {
246 *tooltip = tooltip_;
247 return true;
248 } else {
249 return false;
250 }
251 }
252
253 void HoverHighlightView::SetTooltipText(const base::string16& tooltip) {
254 tooltip_ = tooltip;
255 }
256
243 } // namespace ash 257 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698