OLD | NEW |
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/libgtk2ui/app_indicator_icon.h" | 5 #include "chrome/browser/ui/libgtk2ui/app_indicator_icon.h" |
6 | 6 |
7 #include <dlfcn.h> | 7 #include <dlfcn.h> |
8 #include <gtk/gtk.h> | 8 #include <gtk/gtk.h> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
282 base::Bind(&CreateTempImageFile, | 282 base::Bind(&CreateTempImageFile, |
283 using_kde4_, | 283 using_kde4_, |
284 safe_image.release(), | 284 safe_image.release(), |
285 icon_change_count_, | 285 icon_change_count_, |
286 id_, | 286 id_, |
287 icon_file_path_), | 287 icon_file_path_), |
288 base::Bind(&AppIndicatorIcon::SetImageFromFile, | 288 base::Bind(&AppIndicatorIcon::SetImageFromFile, |
289 weak_factory_.GetWeakPtr())); | 289 weak_factory_.GetWeakPtr())); |
290 } | 290 } |
291 | 291 |
292 void AppIndicatorIcon::SetPressedImage(const gfx::ImageSkia& image) { | |
293 // Ignore pressed images, since the standard on Linux is to not highlight | |
294 // pressed status icons. | |
295 } | |
296 | |
297 void AppIndicatorIcon::SetToolTip(const base::string16& tool_tip) { | 292 void AppIndicatorIcon::SetToolTip(const base::string16& tool_tip) { |
298 DCHECK(!tool_tip_.empty()); | 293 DCHECK(!tool_tip_.empty()); |
299 tool_tip_ = base::UTF16ToUTF8(tool_tip); | 294 tool_tip_ = base::UTF16ToUTF8(tool_tip); |
300 UpdateClickActionReplacementMenuItem(); | 295 UpdateClickActionReplacementMenuItem(); |
301 } | 296 } |
302 | 297 |
303 void AppIndicatorIcon::UpdatePlatformContextMenu(ui::MenuModel* model) { | 298 void AppIndicatorIcon::UpdatePlatformContextMenu(ui::MenuModel* model) { |
304 if (!g_opened) | 299 if (!g_opened) |
305 return; | 300 return; |
306 | 301 |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
370 base::Bind(&AppIndicatorIcon::OnClickActionReplacementMenuItemActivated, | 365 base::Bind(&AppIndicatorIcon::OnClickActionReplacementMenuItemActivated, |
371 base::Unretained(this))); | 366 base::Unretained(this))); |
372 } | 367 } |
373 | 368 |
374 void AppIndicatorIcon::OnClickActionReplacementMenuItemActivated() { | 369 void AppIndicatorIcon::OnClickActionReplacementMenuItemActivated() { |
375 if (delegate()) | 370 if (delegate()) |
376 delegate()->OnClick(); | 371 delegate()->OnClick(); |
377 } | 372 } |
378 | 373 |
379 } // namespace libgtk2ui | 374 } // namespace libgtk2ui |
OLD | NEW |