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

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

Issue 2330403002: Do not activate system tray bubble by default (Closed)
Patch Set: Do not activate system tray bubble by default Created 4 years, 3 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/system/tray/actionable_view.cc ('k') | ash/common/system/tray/system_tray.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 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/common/system/tray/hover_highlight_view.h" 5 #include "ash/common/system/tray/hover_highlight_view.h"
6 6
7 #include "ash/common/system/tray/fixed_sized_image_view.h" 7 #include "ash/common/system/tray/fixed_sized_image_view.h"
8 #include "ash/common/system/tray/tray_constants.h" 8 #include "ash/common/system/tray/tray_constants.h"
9 #include "ash/common/system/tray/view_click_listener.h" 9 #include "ash/common/system/tray/view_click_listener.h"
10 #include "ui/accessibility/ax_view_state.h" 10 #include "ui/accessibility/ax_view_state.h"
(...skipping 15 matching lines...) Expand all
26 const gfx::FontList& GetFontList(bool highlight) { 26 const gfx::FontList& GetFontList(bool highlight) {
27 return ui::ResourceBundle::GetSharedInstance().GetFontList( 27 return ui::ResourceBundle::GetSharedInstance().GetFontList(
28 highlight ? ui::ResourceBundle::BoldFont : ui::ResourceBundle::BaseFont); 28 highlight ? ui::ResourceBundle::BoldFont : ui::ResourceBundle::BaseFont);
29 } 29 }
30 30
31 } // namespace 31 } // namespace
32 32
33 namespace ash { 33 namespace ash {
34 34
35 HoverHighlightView::HoverHighlightView(ViewClickListener* listener) 35 HoverHighlightView::HoverHighlightView(ViewClickListener* listener)
36 : listener_(listener), highlight_color_(kHoverBackgroundColor) { 36 : ActionableView(nullptr),
37 listener_(listener),
38 highlight_color_(kHoverBackgroundColor) {
37 set_notify_enter_exit_on_child(true); 39 set_notify_enter_exit_on_child(true);
38 } 40 }
39 41
40 HoverHighlightView::~HoverHighlightView() {} 42 HoverHighlightView::~HoverHighlightView() {}
41 43
42 bool HoverHighlightView::GetTooltipText(const gfx::Point& p, 44 bool HoverHighlightView::GetTooltipText(const gfx::Point& p,
43 base::string16* tooltip) const { 45 base::string16* tooltip) const {
44 if (tooltip_.empty()) 46 if (tooltip_.empty())
45 return false; 47 return false;
46 *tooltip = tooltip_; 48 *tooltip = tooltip_;
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after
265 void HoverHighlightView::OnPaintBackground(gfx::Canvas* canvas) { 267 void HoverHighlightView::OnPaintBackground(gfx::Canvas* canvas) {
266 canvas->DrawColor(hover_ ? highlight_color_ : default_color_); 268 canvas->DrawColor(hover_ ? highlight_color_ : default_color_);
267 } 269 }
268 270
269 void HoverHighlightView::OnFocus() { 271 void HoverHighlightView::OnFocus() {
270 ScrollRectToVisible(gfx::Rect(gfx::Point(), size())); 272 ScrollRectToVisible(gfx::Rect(gfx::Point(), size()));
271 ActionableView::OnFocus(); 273 ActionableView::OnFocus();
272 } 274 }
273 275
274 } // namespace ash 276 } // namespace ash
OLDNEW
« no previous file with comments | « ash/common/system/tray/actionable_view.cc ('k') | ash/common/system/tray/system_tray.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698