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

Side by Side Diff: chrome/browser/ui/views/status_icons/status_icon_linux_wrapper.cc

Issue 464163003: Remove IDR_STATUS_TRAY_ICON_PRESSED (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Updated the comment Created 6 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "chrome/browser/ui/views/status_icons/status_icon_linux_wrapper.h" 5 #include "chrome/browser/ui/views/status_icons/status_icon_linux_wrapper.h"
6 6
7 #include "ui/views/linux_ui/linux_ui.h" 7 #include "ui/views/linux_ui/linux_ui.h"
8 8
9 StatusIconLinuxWrapper::StatusIconLinuxWrapper( 9 StatusIconLinuxWrapper::StatusIconLinuxWrapper(
10 views::StatusIconLinux* status_icon) 10 views::StatusIconLinux* status_icon)
11 : menu_model_(NULL) { 11 : menu_model_(NULL) {
12 status_icon_.reset(status_icon); 12 status_icon_.reset(status_icon);
13 status_icon_->set_delegate(this); 13 status_icon_->set_delegate(this);
14 } 14 }
15 15
16 StatusIconLinuxWrapper::~StatusIconLinuxWrapper() { 16 StatusIconLinuxWrapper::~StatusIconLinuxWrapper() {
17 if (menu_model_) 17 if (menu_model_)
18 menu_model_->RemoveObserver(this); 18 menu_model_->RemoveObserver(this);
19 } 19 }
20 20
21 void StatusIconLinuxWrapper::SetImage(const gfx::ImageSkia& image) { 21 void StatusIconLinuxWrapper::SetImage(const gfx::ImageSkia& image) {
22 status_icon_->SetImage(image); 22 status_icon_->SetImage(image);
23 } 23 }
24 24
25 void StatusIconLinuxWrapper::SetPressedImage(const gfx::ImageSkia& image) {
26 status_icon_->SetPressedImage(image);
27 }
28
29 void StatusIconLinuxWrapper::SetToolTip(const base::string16& tool_tip) { 25 void StatusIconLinuxWrapper::SetToolTip(const base::string16& tool_tip) {
30 status_icon_->SetToolTip(tool_tip); 26 status_icon_->SetToolTip(tool_tip);
31 } 27 }
32 28
33 void StatusIconLinuxWrapper::DisplayBalloon(const gfx::ImageSkia& icon, 29 void StatusIconLinuxWrapper::DisplayBalloon(const gfx::ImageSkia& icon,
34 const base::string16& title, 30 const base::string16& title,
35 const base::string16& contents) { 31 const base::string16& contents) {
36 notification_.DisplayBalloon(icon, title, contents); 32 notification_.DisplayBalloon(icon, title, contents);
37 } 33 }
38 34
(...skipping 27 matching lines...) Expand all
66 // If a menu already exists, remove ourself from its oberver list. 62 // If a menu already exists, remove ourself from its oberver list.
67 if (menu_model_) 63 if (menu_model_)
68 menu_model_->RemoveObserver(this); 64 menu_model_->RemoveObserver(this);
69 65
70 status_icon_->UpdatePlatformContextMenu(model); 66 status_icon_->UpdatePlatformContextMenu(model);
71 menu_model_ = model; 67 menu_model_ = model;
72 68
73 if (model) 69 if (model)
74 model->AddObserver(this); 70 model->AddObserver(this);
75 } 71 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698