| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/chooser_controller/mock_chooser_controller.h" | 5 #include "chrome/browser/chooser_controller/mock_chooser_controller.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
| 11 #include "chrome/grit/generated_resources.h" | 11 #include "chrome/grit/generated_resources.h" |
| 12 #include "ui/base/l10n/l10n_util.h" | 12 #include "ui/base/l10n/l10n_util.h" |
| 13 | 13 |
| 14 MockChooserController::MockChooserController(content::RenderFrameHost* owner) | 14 MockChooserController::MockChooserController() |
| 15 : ChooserController(owner, | 15 : ChooserController(nullptr, |
| 16 IDS_USB_DEVICE_CHOOSER_PROMPT_ORIGIN, | 16 IDS_USB_DEVICE_CHOOSER_PROMPT_ORIGIN, |
| 17 IDS_USB_DEVICE_CHOOSER_PROMPT_EXTENSION_NAME) {} | 17 IDS_USB_DEVICE_CHOOSER_PROMPT_EXTENSION_NAME) {} |
| 18 | 18 |
| 19 MockChooserController::~MockChooserController() {} | 19 MockChooserController::~MockChooserController() {} |
| 20 | 20 |
| 21 bool MockChooserController::ShouldShowIconBeforeText() const { | 21 bool MockChooserController::ShouldShowIconBeforeText() const { |
| 22 return true; | 22 return true; |
| 23 } | 23 } |
| 24 | 24 |
| 25 base::string16 MockChooserController::GetNoOptionsText() const { | 25 base::string16 MockChooserController::GetNoOptionsText() const { |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 147 const int MockChooserController::kSignalStrengthLevel1Bar = 1; | 147 const int MockChooserController::kSignalStrengthLevel1Bar = 1; |
| 148 const int MockChooserController::kSignalStrengthLevel2Bar = 2; | 148 const int MockChooserController::kSignalStrengthLevel2Bar = 2; |
| 149 const int MockChooserController::kSignalStrengthLevel3Bar = 3; | 149 const int MockChooserController::kSignalStrengthLevel3Bar = 3; |
| 150 const int MockChooserController::kSignalStrengthLevel4Bar = 4; | 150 const int MockChooserController::kSignalStrengthLevel4Bar = 4; |
| 151 const int MockChooserController::kImageColorUnselected = 0; | 151 const int MockChooserController::kImageColorUnselected = 0; |
| 152 const int MockChooserController::kImageColorSelected = 1; | 152 const int MockChooserController::kImageColorSelected = 1; |
| 153 | 153 |
| 154 void MockChooserController::ClearAllOptions() { | 154 void MockChooserController::ClearAllOptions() { |
| 155 options_.clear(); | 155 options_.clear(); |
| 156 } | 156 } |
| OLD | NEW |