OLD | NEW |
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/shell_render_frame_observer.h" | 5 #include "content/shell/renderer/shell_render_frame_observer.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "content/shell/common/shell_switches.h" | 8 #include "content/shell/common/shell_switches.h" |
9 #include "content/shell/renderer/shell_render_process_observer.h" | 9 #include "content/shell/renderer/shell_render_process_observer.h" |
10 #include "third_party/WebKit/public/testing/WebTestInterfaces.h" | 10 #include "content/shell/renderer/test_runner/WebTestInterfaces.h" |
11 #include "third_party/WebKit/public/testing/WebTestRunner.h" | 11 #include "content/shell/renderer/test_runner/WebTestRunner.h" |
12 #include "third_party/WebKit/public/web/WebFrame.h" | 12 #include "third_party/WebKit/public/web/WebFrame.h" |
13 | 13 |
14 namespace content { | 14 namespace content { |
15 | 15 |
16 ShellRenderFrameObserver::ShellRenderFrameObserver(RenderFrame* render_frame) | 16 ShellRenderFrameObserver::ShellRenderFrameObserver(RenderFrame* render_frame) |
17 : RenderFrameObserver(render_frame) { | 17 : RenderFrameObserver(render_frame) { |
18 } | 18 } |
19 | 19 |
20 void ShellRenderFrameObserver::WebFrameCreated(blink::WebFrame* frame) { | 20 void ShellRenderFrameObserver::WebFrameCreated(blink::WebFrame* frame) { |
21 if (!CommandLine::ForCurrentProcess()->HasSwitch(switches::kDumpRenderTree)) | 21 if (!CommandLine::ForCurrentProcess()->HasSwitch(switches::kDumpRenderTree)) |
22 return; | 22 return; |
23 frame->setPermissionClient( | 23 frame->setPermissionClient( |
24 ShellRenderProcessObserver::GetInstance()->test_interfaces()->testRunner() | 24 ShellRenderProcessObserver::GetInstance()->test_interfaces()->testRunner() |
25 ->webPermissions()); | 25 ->webPermissions()); |
26 } | 26 } |
27 | 27 |
28 } // namespace content | 28 } // namespace content |
OLD | NEW |