| OLD | NEW |
| 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/system/tray_user.h" | 5 #include "ash/system/tray_user.h" |
| 6 | 6 |
| 7 #include "ash/shell.h" | 7 #include "ash/shell.h" |
| 8 #include "ash/system/tray/system_tray_delegate.h" | 8 #include "ash/system/tray/system_tray_delegate.h" |
| 9 #include "base/utf_string_conversions.h" | 9 #include "base/utf_string_conversions.h" |
| 10 #include "grit/ash_strings.h" | 10 #include "grit/ash_strings.h" |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 virtual void OnMouseEntered(const views::MouseEvent& event) OVERRIDE { | 42 virtual void OnMouseEntered(const views::MouseEvent& event) OVERRIDE { |
| 43 hover_ = true; | 43 hover_ = true; |
| 44 SchedulePaint(); | 44 SchedulePaint(); |
| 45 } | 45 } |
| 46 | 46 |
| 47 virtual void OnMouseExited(const views::MouseEvent& event) OVERRIDE { | 47 virtual void OnMouseExited(const views::MouseEvent& event) OVERRIDE { |
| 48 hover_ = false; | 48 hover_ = false; |
| 49 SchedulePaint(); | 49 SchedulePaint(); |
| 50 } | 50 } |
| 51 | 51 |
| 52 virtual void OnPaintBackground(gfx::Canvas* canvas) OVERRIDE { | 52 virtual void OnPaintBackground(gfx::CanvasSkia* canvas) OVERRIDE { |
| 53 if (hover_) | 53 if (hover_) |
| 54 hover_bg_->Paint(canvas, this); | 54 hover_bg_->Paint(canvas, this); |
| 55 else | 55 else |
| 56 views::TextButton::OnPaintBackground(canvas); | 56 views::TextButton::OnPaintBackground(canvas); |
| 57 } | 57 } |
| 58 | 58 |
| 59 bool hover_; | 59 bool hover_; |
| 60 views::Background* hover_bg_; | 60 views::Background* hover_bg_; |
| 61 | 61 |
| 62 DISALLOW_COPY_AND_ASSIGN(TrayButton); | 62 DISALLOW_COPY_AND_ASSIGN(TrayButton); |
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 164 } | 164 } |
| 165 | 165 |
| 166 void TrayUser::DestroyDefaultView() { | 166 void TrayUser::DestroyDefaultView() { |
| 167 } | 167 } |
| 168 | 168 |
| 169 void TrayUser::DestroyDetailedView() { | 169 void TrayUser::DestroyDetailedView() { |
| 170 } | 170 } |
| 171 | 171 |
| 172 } // namespace internal | 172 } // namespace internal |
| 173 } // namespace ash | 173 } // namespace ash |
| OLD | NEW |