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

Side by Side Diff: content/shell/renderer/test_runner/test_runner.cc

Issue 216793014: Move dispatchBeforeUnloadEvent to WebFrame, part 2/3. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 8 months 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 | Annotate | Revision Log
« no previous file with comments | « content/renderer/render_frame_impl.cc ('k') | no next file » | 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 "content/shell/renderer/test_runner/test_runner.h" 5 #include "content/shell/renderer/test_runner/test_runner.h"
6 6
7 #include <limits> 7 #include <limits>
8 8
9 #include "content/shell/common/test_runner/WebPreferences.h" 9 #include "content/shell/common/test_runner/WebPreferences.h"
10 #include "content/shell/renderer/test_runner/MockWebSpeechInputController.h" 10 #include "content/shell/renderer/test_runner/MockWebSpeechInputController.h"
(...skipping 1915 matching lines...) Expand 10 before | Expand all | Expand 10 after
1926 web_view_->focusedFrame()->executeCommand(WebString::fromUTF8(command), 1926 web_view_->focusedFrame()->executeCommand(WebString::fromUTF8(command),
1927 WebString::fromUTF8(value)); 1927 WebString::fromUTF8(value));
1928 } 1928 }
1929 1929
1930 bool TestRunner::IsCommandEnabled(const std::string& command) { 1930 bool TestRunner::IsCommandEnabled(const std::string& command) {
1931 return web_view_->focusedFrame()->isCommandEnabled( 1931 return web_view_->focusedFrame()->isCommandEnabled(
1932 WebString::fromUTF8(command)); 1932 WebString::fromUTF8(command));
1933 } 1933 }
1934 1934
1935 bool TestRunner::CallShouldCloseOnWebView() { 1935 bool TestRunner::CallShouldCloseOnWebView() {
1936 return web_view_->dispatchBeforeUnloadEvent(); 1936 return web_view_->mainFrame()->dispatchBeforeUnloadEvent();
1937 } 1937 }
1938 1938
1939 void TestRunner::SetDomainRelaxationForbiddenForURLScheme( 1939 void TestRunner::SetDomainRelaxationForbiddenForURLScheme(
1940 bool forbidden, const std::string& scheme) { 1940 bool forbidden, const std::string& scheme) {
1941 web_view_->setDomainRelaxationForbidden(forbidden, 1941 web_view_->setDomainRelaxationForbidden(forbidden,
1942 WebString::fromUTF8(scheme)); 1942 WebString::fromUTF8(scheme));
1943 } 1943 }
1944 1944
1945 v8::Handle<v8::Value> TestRunner::EvaluateScriptInIsolatedWorldAndReturnValue( 1945 v8::Handle<v8::Value> TestRunner::EvaluateScriptInIsolatedWorldAndReturnValue(
1946 int world_id, 1946 int world_id,
(...skipping 681 matching lines...) Expand 10 before | Expand all | Expand 10 after
2628 } 2628 }
2629 2629
2630 void TestRunner::DidLosePointerLockInternal() { 2630 void TestRunner::DidLosePointerLockInternal() {
2631 bool was_locked = pointer_locked_; 2631 bool was_locked = pointer_locked_;
2632 pointer_locked_ = false; 2632 pointer_locked_ = false;
2633 if (was_locked) 2633 if (was_locked)
2634 web_view_->didLosePointerLock(); 2634 web_view_->didLosePointerLock();
2635 } 2635 }
2636 2636
2637 } // namespace content 2637 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/render_frame_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698