| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/toolbar/media_router_action.h" | 5 #include "chrome/browser/ui/toolbar/media_router_action.h" |
| 6 | 6 |
| 7 #include "base/metrics/user_metrics.h" | 7 #include "base/metrics/user_metrics.h" |
| 8 #include "base/strings/utf_string_conversions.h" | 8 #include "base/strings/utf_string_conversions.h" |
| 9 #include "chrome/browser/media/router/issue.h" | 9 #include "chrome/browser/media/router/issue.h" |
| 10 #include "chrome/browser/media/router/media_route.h" | 10 #include "chrome/browser/media/router/media_route.h" |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 return l10n_util::GetStringUTF16(IDS_MEDIA_ROUTER_TITLE); | 97 return l10n_util::GetStringUTF16(IDS_MEDIA_ROUTER_TITLE); |
| 98 } | 98 } |
| 99 | 99 |
| 100 base::string16 MediaRouterAction::GetAccessibleName( | 100 base::string16 MediaRouterAction::GetAccessibleName( |
| 101 content::WebContents* web_contents) const { | 101 content::WebContents* web_contents) const { |
| 102 return GetTooltip(web_contents); | 102 return GetTooltip(web_contents); |
| 103 } | 103 } |
| 104 | 104 |
| 105 base::string16 MediaRouterAction::GetTooltip( | 105 base::string16 MediaRouterAction::GetTooltip( |
| 106 content::WebContents* web_contents) const { | 106 content::WebContents* web_contents) const { |
| 107 return l10n_util::GetStringUTF16(IDS_MEDIA_ROUTER_SHARE_YOUR_SCREEN_TEXT); | 107 return l10n_util::GetStringUTF16(IDS_MEDIA_ROUTER_ICON_TOOLTIP_TEXT); |
| 108 } | 108 } |
| 109 | 109 |
| 110 bool MediaRouterAction::IsEnabled( | 110 bool MediaRouterAction::IsEnabled( |
| 111 content::WebContents* web_contents) const { | 111 content::WebContents* web_contents) const { |
| 112 return true; | 112 return true; |
| 113 } | 113 } |
| 114 | 114 |
| 115 bool MediaRouterAction::WantsToRun( | 115 bool MediaRouterAction::WantsToRun( |
| 116 content::WebContents* web_contents) const { | 116 content::WebContents* web_contents) const { |
| 117 return false; | 117 return false; |
| (...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 248 if (issue_) { | 248 if (issue_) { |
| 249 if (issue_->severity() == media_router::Issue::FATAL) | 249 if (issue_->severity() == media_router::Issue::FATAL) |
| 250 return &media_router_error_icon_; | 250 return &media_router_error_icon_; |
| 251 if (issue_->severity() == media_router::Issue::WARNING) | 251 if (issue_->severity() == media_router::Issue::WARNING) |
| 252 return &media_router_warning_icon_; | 252 return &media_router_warning_icon_; |
| 253 } | 253 } |
| 254 | 254 |
| 255 return has_local_display_route_ ? &media_router_active_icon_ | 255 return has_local_display_route_ ? &media_router_active_icon_ |
| 256 : &media_router_idle_icon_; | 256 : &media_router_idle_icon_; |
| 257 } | 257 } |
| OLD | NEW |