| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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/chromeos/status/feedback_menu_button.h" | 5 #include "chrome/browser/chromeos/status/feedback_menu_button.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "app/l10n_util.h" |
| 9 #include "app/resource_bundle.h" | 10 #include "app/resource_bundle.h" |
| 10 #include "chrome/app/chrome_dll_resource.h" | 11 #include "chrome/app/chrome_dll_resource.h" |
| 11 #include "chrome/browser/chromeos/status/status_area_host.h" | 12 #include "chrome/browser/chromeos/status/status_area_host.h" |
| 12 #include "gfx/canvas.h" | 13 #include "gfx/canvas.h" |
| 13 #include "grit/generated_resources.h" | 14 #include "grit/generated_resources.h" |
| 14 #include "grit/theme_resources.h" | 15 #include "grit/theme_resources.h" |
| 15 | 16 |
| 16 namespace chromeos { | 17 namespace chromeos { |
| 17 | 18 |
| 18 //////////////////////////////////////////////////////////////////////////////// | 19 //////////////////////////////////////////////////////////////////////////////// |
| 19 // LanguageMenuButton | 20 // LanguageMenuButton |
| 20 | 21 |
| 21 FeedbackMenuButton::FeedbackMenuButton(StatusAreaHost* host) | 22 FeedbackMenuButton::FeedbackMenuButton(StatusAreaHost* host) |
| 22 : StatusAreaButton(this), | 23 : StatusAreaButton(this), |
| 23 host_(host) { | 24 host_(host) { |
| 24 DCHECK(host_); | 25 DCHECK(host_); |
| 26 SetTooltipText(l10n_util::GetString(IDS_STATUSBAR_FEEDBACK_TOOLTIP)); |
| 25 } | 27 } |
| 26 | 28 |
| 27 FeedbackMenuButton::~FeedbackMenuButton() { | 29 FeedbackMenuButton::~FeedbackMenuButton() { |
| 28 } | 30 } |
| 29 | 31 |
| 30 //////////////////////////////////////////////////////////////////////////////// | 32 //////////////////////////////////////////////////////////////////////////////// |
| 31 // FeedbackMenuButton, StatusAreaButton implementation: | 33 // FeedbackMenuButton, StatusAreaButton implementation: |
| 32 | 34 |
| 33 void FeedbackMenuButton::DrawPressed(gfx::Canvas* canvas) { | 35 void FeedbackMenuButton::DrawPressed(gfx::Canvas* canvas) { |
| 34 DrawFeedbackIcon(canvas, *ResourceBundle::GetSharedInstance(). | 36 DrawFeedbackIcon(canvas, *ResourceBundle::GetSharedInstance(). |
| (...skipping 13 matching lines...) Expand all Loading... |
| 48 | 50 |
| 49 //////////////////////////////////////////////////////////////////////////////// | 51 //////////////////////////////////////////////////////////////////////////////// |
| 50 // PowerMenuButton, views::ViewMenuDelegate implementation: | 52 // PowerMenuButton, views::ViewMenuDelegate implementation: |
| 51 | 53 |
| 52 void FeedbackMenuButton::RunMenu(views::View* source, const gfx::Point& pt) { | 54 void FeedbackMenuButton::RunMenu(views::View* source, const gfx::Point& pt) { |
| 53 DCHECK(host_); | 55 DCHECK(host_); |
| 54 host_->ExecuteBrowserCommand(IDC_REPORT_BUG); | 56 host_->ExecuteBrowserCommand(IDC_REPORT_BUG); |
| 55 } | 57 } |
| 56 | 58 |
| 57 } // namespace chromeos | 59 } // namespace chromeos |
| OLD | NEW |