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

Side by Side Diff: content/shell/renderer/layout_test/layout_test_render_frame_observer.cc

Issue 2797073002: Move WebTextCheckClient reference from WebViewImpl to WebLocalFrameImpl (Closed)
Patch Set: Spell my name correctly Created 3 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/layout_test/layout_test_render_frame_observer.h " 5 #include "content/shell/renderer/layout_test/layout_test_render_frame_observer.h "
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "content/public/common/associated_interface_registry.h" 9 #include "content/public/common/associated_interface_registry.h"
10 #include "content/public/renderer/render_frame.h" 10 #include "content/public/renderer/render_frame.h"
11 #include "content/shell/common/shell_messages.h" 11 #include "content/shell/common/shell_messages.h"
12 #include "content/shell/renderer/layout_test/blink_test_runner.h" 12 #include "content/shell/renderer/layout_test/blink_test_runner.h"
13 #include "content/shell/renderer/layout_test/layout_test_render_thread_observer. h" 13 #include "content/shell/renderer/layout_test/layout_test_render_thread_observer. h"
14 #include "content/shell/test_runner/web_test_interfaces.h" 14 #include "content/shell/test_runner/web_test_interfaces.h"
15 #include "content/shell/test_runner/web_test_runner.h" 15 #include "content/shell/test_runner/web_test_runner.h"
16 #include "ipc/ipc_message_macros.h" 16 #include "ipc/ipc_message_macros.h"
17 #include "third_party/WebKit/public/web/WebLocalFrame.h" 17 #include "third_party/WebKit/public/web/WebLocalFrame.h"
18 18
19 namespace content { 19 namespace content {
20 20
21 LayoutTestRenderFrameObserver::LayoutTestRenderFrameObserver( 21 LayoutTestRenderFrameObserver::LayoutTestRenderFrameObserver(
22 RenderFrame* render_frame) 22 RenderFrame* render_frame)
23 : RenderFrameObserver(render_frame), binding_(this) { 23 : RenderFrameObserver(render_frame), binding_(this) {
24 render_frame->GetWebFrame()->setContentSettingsClient( 24 test_runner::WebTestRunner* test_runner =
25 LayoutTestRenderThreadObserver::GetInstance() 25 LayoutTestRenderThreadObserver::GetInstance()
26 ->test_interfaces() 26 ->test_interfaces()
27 ->TestRunner() 27 ->TestRunner();
28 ->GetWebContentSettings()); 28 render_frame->GetWebFrame()->setContentSettingsClient(
29 test_runner->GetWebContentSettings());
30 render_frame->GetWebFrame()->setTextCheckClient(
31 test_runner->GetWebTextCheckClient());
29 render_frame->GetAssociatedInterfaceRegistry()->AddInterface(base::Bind( 32 render_frame->GetAssociatedInterfaceRegistry()->AddInterface(base::Bind(
30 &LayoutTestRenderFrameObserver::BindRequest, base::Unretained(this))); 33 &LayoutTestRenderFrameObserver::BindRequest, base::Unretained(this)));
31 } 34 }
32 35
33 LayoutTestRenderFrameObserver::~LayoutTestRenderFrameObserver() = default; 36 LayoutTestRenderFrameObserver::~LayoutTestRenderFrameObserver() = default;
34 37
35 void LayoutTestRenderFrameObserver::BindRequest( 38 void LayoutTestRenderFrameObserver::BindRequest(
36 mojom::LayoutTestControlAssociatedRequest request) { 39 mojom::LayoutTestControlAssociatedRequest request) {
37 binding_.Bind(std::move(request)); 40 binding_.Bind(std::move(request));
38 } 41 }
(...skipping 22 matching lines...) Expand all
61 BlinkTestRunner::Get(render_frame()->GetRenderView()) 64 BlinkTestRunner::Get(render_frame()->GetRenderView())
62 ->OnSetTestConfiguration(std::move(config)); 65 ->OnSetTestConfiguration(std::move(config));
63 } 66 }
64 67
65 void LayoutTestRenderFrameObserver::SetupSecondaryRenderer() { 68 void LayoutTestRenderFrameObserver::SetupSecondaryRenderer() {
66 BlinkTestRunner::Get(render_frame()->GetRenderView()) 69 BlinkTestRunner::Get(render_frame()->GetRenderView())
67 ->OnSetupSecondaryRenderer(); 70 ->OnSetupSecondaryRenderer();
68 } 71 }
69 72
70 } // namespace content 73 } // namespace content
OLDNEW
« no previous file with comments | « components/spellcheck/renderer/spellcheck_provider.cc ('k') | content/shell/test_runner/test_runner.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698