| 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 "components/test_runner/test_runner_for_specific_view.h" | 5 #include "components/test_runner/test_runner_for_specific_view.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <limits> | 8 #include <limits> |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 360 | 360 |
| 361 void TestRunnerForSpecificView::SendBluetoothManualChooserEvent( | 361 void TestRunnerForSpecificView::SendBluetoothManualChooserEvent( |
| 362 const std::string& event, | 362 const std::string& event, |
| 363 const std::string& argument) { | 363 const std::string& argument) { |
| 364 delegate()->SendBluetoothManualChooserEvent(event, argument); | 364 delegate()->SendBluetoothManualChooserEvent(event, argument); |
| 365 } | 365 } |
| 366 | 366 |
| 367 void TestRunnerForSpecificView::SetBackingScaleFactor( | 367 void TestRunnerForSpecificView::SetBackingScaleFactor( |
| 368 double value, | 368 double value, |
| 369 v8::Local<v8::Function> callback) { | 369 v8::Local<v8::Function> callback) { |
| 370 delegate()->SetDeviceScaleFactor(value); | 370 bool use_zoom_for_dsf_enabled = delegate()->SetDeviceScaleFactor(value); |
| 371 PostV8Callback(callback); | 371 |
| 372 v8::UniquePersistent<v8::Function> global_callback(blink::mainThreadIsolate(), |
| 373 callback); |
| 374 v8::Local<v8::Value> arg = |
| 375 v8::Boolean::New(blink::mainThreadIsolate(), use_zoom_for_dsf_enabled); |
| 376 PostV8CallbackWithArgs(std::move(global_callback), 1, &arg); |
| 372 } | 377 } |
| 373 | 378 |
| 374 void TestRunnerForSpecificView::EnableUseZoomForDSF( | 379 void TestRunnerForSpecificView::EnableUseZoomForDSF( |
| 375 v8::Local<v8::Function> callback) { | 380 v8::Local<v8::Function> callback) { |
| 376 delegate()->EnableUseZoomForDSF(); | 381 delegate()->EnableUseZoomForDSF(); |
| 377 PostV8Callback(callback); | 382 PostV8Callback(callback); |
| 378 } | 383 } |
| 379 | 384 |
| 380 void TestRunnerForSpecificView::SetColorProfile( | 385 void TestRunnerForSpecificView::SetColorProfile( |
| 381 const std::string& name, | 386 const std::string& name, |
| (...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 677 | 682 |
| 678 blink::WebView* TestRunnerForSpecificView::web_view() { | 683 blink::WebView* TestRunnerForSpecificView::web_view() { |
| 679 return web_test_proxy_base_->web_view(); | 684 return web_test_proxy_base_->web_view(); |
| 680 } | 685 } |
| 681 | 686 |
| 682 WebTestDelegate* TestRunnerForSpecificView::delegate() { | 687 WebTestDelegate* TestRunnerForSpecificView::delegate() { |
| 683 return web_test_proxy_base_->delegate(); | 688 return web_test_proxy_base_->delegate(); |
| 684 } | 689 } |
| 685 | 690 |
| 686 } // namespace test_runner | 691 } // namespace test_runner |
| OLD | NEW |