Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(345)

Side by Side Diff: components/test_runner/web_test_proxy.cc

Issue 1416123005: Implement setSinkId() for media elements without src. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « components/test_runner/web_test_proxy.h ('k') | content/renderer/render_frame_impl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "components/test_runner/web_test_proxy.h" 5 #include "components/test_runner/web_test_proxy.h"
6 6
7 #include <cctype> 7 #include <cctype>
8 8
9 #include "base/callback_helpers.h" 9 #include "base/callback_helpers.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 1390 matching lines...) Expand 10 before | Expand all | Expand 10 after
1401 } 1401 }
1402 } 1402 }
1403 1403
1404 void WebTestProxyBase::ResetInputMethod() { 1404 void WebTestProxyBase::ResetInputMethod() {
1405 // If a composition text exists, then we need to let the browser process 1405 // If a composition text exists, then we need to let the browser process
1406 // to cancel the input method's ongoing composition session. 1406 // to cancel the input method's ongoing composition session.
1407 if (web_widget_) 1407 if (web_widget_)
1408 web_widget_->confirmComposition(); 1408 web_widget_->confirmComposition();
1409 } 1409 }
1410 1410
1411 void WebTestProxyBase::CheckIfAudioSinkExistsAndIsAuthorized(
1412 const blink::WebString& sink_id,
1413 const blink::WebSecurityOrigin& security_origin,
1414 blink::WebSetSinkIdCallbacks* web_callbacks) {
1415 scoped_ptr<blink::WebSetSinkIdCallbacks> callback(web_callbacks);
1416 std::string device_id = sink_id.utf8();
1417 if (device_id == "valid" || device_id.empty())
1418 callback->onSuccess();
1419 else if (device_id == "unauthorized")
1420 callback->onError(blink::WebSetSinkIdError::NotAuthorized);
1421 else
1422 callback->onError(blink::WebSetSinkIdError::NotFound);
1423 }
1424
1411 blink::WebString WebTestProxyBase::acceptLanguages() { 1425 blink::WebString WebTestProxyBase::acceptLanguages() {
1412 return blink::WebString::fromUTF8(accept_languages_); 1426 return blink::WebString::fromUTF8(accept_languages_);
1413 } 1427 }
1414 1428
1415 } // namespace test_runner 1429 } // namespace test_runner
OLDNEW
« no previous file with comments | « components/test_runner/web_test_proxy.h ('k') | content/renderer/render_frame_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698