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

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

Issue 2012823003: Move IME related functions from WebFrame to WebLocalFrame (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: sync Created 4 years, 6 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
OLDNEW
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 646 matching lines...) Expand 10 before | Expand all | Expand 10 after
657 } 657 }
658 658
659 WebLocalFrame* frame = web_view()->mainFrame()->toWebLocalFrame(); 659 WebLocalFrame* frame = web_view()->mainFrame()->toWebLocalFrame();
660 const bool find_result = frame->find(0, WebString::fromUTF8(search_text), 660 const bool find_result = frame->find(0, WebString::fromUTF8(search_text),
661 find_options, wrap_around, 0); 661 find_options, wrap_around, 0);
662 frame->stopFinding(WebLocalFrame::StopFindActionKeepSelection); 662 frame->stopFinding(WebLocalFrame::StopFindActionKeepSelection);
663 return find_result; 663 return find_result;
664 } 664 }
665 665
666 std::string TestRunnerForSpecificView::SelectionAsMarkup() { 666 std::string TestRunnerForSpecificView::SelectionAsMarkup() {
667 return web_view()->mainFrame()->selectionAsMarkup().utf8(); 667 return web_view()->mainFrame()->toWebLocalFrame()->selectionAsMarkup().utf8();
668 } 668 }
669 669
670 void TestRunnerForSpecificView::SetViewSourceForFrame(const std::string& name, 670 void TestRunnerForSpecificView::SetViewSourceForFrame(const std::string& name,
671 bool enabled) { 671 bool enabled) {
672 WebFrame* target_frame = 672 WebFrame* target_frame =
673 web_view()->findFrameByName(WebString::fromUTF8(name)); 673 web_view()->findFrameByName(WebString::fromUTF8(name));
674 if (target_frame) 674 if (target_frame)
675 target_frame->enableViewSourceMode(enabled); 675 target_frame->enableViewSourceMode(enabled);
676 } 676 }
677 677
678 blink::WebView* TestRunnerForSpecificView::web_view() { 678 blink::WebView* TestRunnerForSpecificView::web_view() {
679 return web_test_proxy_base_->web_view(); 679 return web_test_proxy_base_->web_view();
680 } 680 }
681 681
682 WebTestDelegate* TestRunnerForSpecificView::delegate() { 682 WebTestDelegate* TestRunnerForSpecificView::delegate() {
683 return web_test_proxy_base_->delegate(); 683 return web_test_proxy_base_->delegate();
684 } 684 }
685 685
686 } // namespace test_runner 686 } // namespace test_runner
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698