| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "content/shell/test_runner/test_interfaces.h" | 5 #include "content/shell/test_runner/test_interfaces.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 52 | 52 |
| 53 void TestInterfaces::SetDelegate(WebTestDelegate* delegate) { | 53 void TestInterfaces::SetDelegate(WebTestDelegate* delegate) { |
| 54 if (delegate) | 54 if (delegate) |
| 55 gamepad_controller_ = GamepadController::Create(delegate); | 55 gamepad_controller_ = GamepadController::Create(delegate); |
| 56 else | 56 else |
| 57 gamepad_controller_ = nullptr; | 57 gamepad_controller_ = nullptr; |
| 58 test_runner_->SetDelegate(delegate); | 58 test_runner_->SetDelegate(delegate); |
| 59 delegate_ = delegate; | 59 delegate_ = delegate; |
| 60 } | 60 } |
| 61 | 61 |
| 62 void TestInterfaces::BindTo(blink::WebFrame* frame) { | 62 void TestInterfaces::BindTo(blink::WebLocalFrame* frame) { |
| 63 if (gamepad_controller_) | 63 if (gamepad_controller_) |
| 64 gamepad_controller_->Install(frame); | 64 gamepad_controller_->Install(frame); |
| 65 GCController::Install(frame); | 65 GCController::Install(frame); |
| 66 } | 66 } |
| 67 | 67 |
| 68 void TestInterfaces::ResetTestHelperControllers() { | 68 void TestInterfaces::ResetTestHelperControllers() { |
| 69 if (gamepad_controller_) | 69 if (gamepad_controller_) |
| 70 gamepad_controller_->Reset(); | 70 gamepad_controller_->Reset(); |
| 71 blink::WebCache::Clear(); | 71 blink::WebCache::Clear(); |
| 72 | 72 |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 160 | 160 |
| 161 blink::WebThemeEngine* TestInterfaces::GetThemeEngine() { | 161 blink::WebThemeEngine* TestInterfaces::GetThemeEngine() { |
| 162 if (!test_runner_->UseMockTheme()) | 162 if (!test_runner_->UseMockTheme()) |
| 163 return 0; | 163 return 0; |
| 164 if (!theme_engine_.get()) | 164 if (!theme_engine_.get()) |
| 165 theme_engine_.reset(new MockWebThemeEngine()); | 165 theme_engine_.reset(new MockWebThemeEngine()); |
| 166 return theme_engine_.get(); | 166 return theme_engine_.get(); |
| 167 } | 167 } |
| 168 | 168 |
| 169 } // namespace test_runner | 169 } // namespace test_runner |
| OLD | NEW |