| 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/test_toolbar_action_view_controller.h" | 5 #include "chrome/browser/ui/toolbar/test_toolbar_action_view_controller.h" |
| 6 | 6 |
| 7 #include "base/strings/string16.h" | 7 #include "base/strings/string16.h" |
| 8 #include "chrome/browser/ui/toolbar/toolbar_action_view_delegate.h" | 8 #include "chrome/browser/ui/toolbar/toolbar_action_view_delegate.h" |
| 9 #include "ui/gfx/image/image.h" | 9 #include "ui/gfx/image/image.h" |
| 10 #include "ui/gfx/image/image_skia.h" | 10 #include "ui/gfx/image/image_skia.h" |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 const std::string& TestToolbarActionViewController::GetId() const { | 24 const std::string& TestToolbarActionViewController::GetId() const { |
| 25 return id_; | 25 return id_; |
| 26 } | 26 } |
| 27 | 27 |
| 28 void TestToolbarActionViewController::SetDelegate( | 28 void TestToolbarActionViewController::SetDelegate( |
| 29 ToolbarActionViewDelegate* delegate) { | 29 ToolbarActionViewDelegate* delegate) { |
| 30 delegate_ = delegate; | 30 delegate_ = delegate; |
| 31 } | 31 } |
| 32 | 32 |
| 33 gfx::Image TestToolbarActionViewController::GetIcon( | 33 gfx::Image TestToolbarActionViewController::GetIcon( |
| 34 content::WebContents* web_contents) { | 34 content::WebContents* web_contents, |
| 35 const gfx::Size& size) { |
| 35 return gfx::Image(); | 36 return gfx::Image(); |
| 36 } | 37 } |
| 37 | 38 |
| 38 gfx::ImageSkia TestToolbarActionViewController::GetIconWithBadge() { | |
| 39 return gfx::ImageSkia(); | |
| 40 } | |
| 41 | |
| 42 base::string16 TestToolbarActionViewController::GetActionName() const { | 39 base::string16 TestToolbarActionViewController::GetActionName() const { |
| 43 return base::string16(); | 40 return base::string16(); |
| 44 } | 41 } |
| 45 | 42 |
| 46 base::string16 TestToolbarActionViewController::GetAccessibleName( | 43 base::string16 TestToolbarActionViewController::GetAccessibleName( |
| 47 content::WebContents* web_contents) const { | 44 content::WebContents* web_contents) const { |
| 48 return accessible_name_; | 45 return accessible_name_; |
| 49 } | 46 } |
| 50 | 47 |
| 51 base::string16 TestToolbarActionViewController::GetTooltip( | 48 base::string16 TestToolbarActionViewController::GetTooltip( |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 116 | 113 |
| 117 void TestToolbarActionViewController::SetWantsToRun(bool wants_to_run) { | 114 void TestToolbarActionViewController::SetWantsToRun(bool wants_to_run) { |
| 118 wants_to_run_ = wants_to_run; | 115 wants_to_run_ = wants_to_run; |
| 119 UpdateDelegate(); | 116 UpdateDelegate(); |
| 120 } | 117 } |
| 121 | 118 |
| 122 void TestToolbarActionViewController::UpdateDelegate() { | 119 void TestToolbarActionViewController::UpdateDelegate() { |
| 123 if (delegate_) | 120 if (delegate_) |
| 124 delegate_->UpdateState(); | 121 delegate_->UpdateState(); |
| 125 } | 122 } |
| OLD | NEW |