| 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/public/renderer/render_frame.h" | 8 #include "content/public/renderer/render_frame.h" | 
| 9 #include "content/shell/common/shell_switches.h" | 9 #include "content/shell/common/shell_switches.h" | 
| 10 #include "content/shell/renderer/shell_render_process_observer.h" | 10 #include "content/shell/renderer/shell_render_process_observer.h" | 
| 11 #include "content/shell/renderer/test_runner/WebTestInterfaces.h" | 11 #include "content/shell/renderer/test_runner/web_test_interfaces.h" | 
| 12 #include "content/shell/renderer/test_runner/web_test_runner.h" | 12 #include "content/shell/renderer/test_runner/web_test_runner.h" | 
| 13 #include "third_party/WebKit/public/web/WebLocalFrame.h" | 13 #include "third_party/WebKit/public/web/WebLocalFrame.h" | 
| 14 | 14 | 
| 15 namespace content { | 15 namespace content { | 
| 16 | 16 | 
| 17 ShellRenderFrameObserver::ShellRenderFrameObserver(RenderFrame* render_frame) | 17 ShellRenderFrameObserver::ShellRenderFrameObserver(RenderFrame* render_frame) | 
| 18     : RenderFrameObserver(render_frame) { | 18     : RenderFrameObserver(render_frame) { | 
| 19   if (!CommandLine::ForCurrentProcess()->HasSwitch(switches::kDumpRenderTree)) | 19   if (!CommandLine::ForCurrentProcess()->HasSwitch(switches::kDumpRenderTree)) | 
| 20     return; | 20     return; | 
| 21   render_frame->GetWebFrame()->setPermissionClient( | 21   render_frame->GetWebFrame()->setPermissionClient( | 
| 22       ShellRenderProcessObserver::GetInstance()->test_interfaces()-> | 22       ShellRenderProcessObserver::GetInstance() | 
| 23           testRunner()->GetWebPermissions()); | 23           ->test_interfaces() | 
|  | 24           ->TestRunner() | 
|  | 25           ->GetWebPermissions()); | 
| 24 } | 26 } | 
| 25 | 27 | 
| 26 }  // namespace content | 28 }  // namespace content | 
| OLD | NEW | 
|---|