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

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

Issue 138333006: Now that RenderFrame is 1:1 with WebFrame, add the associated getters and start cleaning up assumpt… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 6 years, 11 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
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/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/shell/common/shell_switches.h" 9 #include "content/shell/common/shell_switches.h"
9 #include "content/shell/renderer/shell_render_process_observer.h" 10 #include "content/shell/renderer/shell_render_process_observer.h"
10 #include "content/shell/renderer/test_runner/WebTestInterfaces.h" 11 #include "content/shell/renderer/test_runner/WebTestInterfaces.h"
11 #include "content/shell/renderer/test_runner/WebTestRunner.h" 12 #include "content/shell/renderer/test_runner/WebTestRunner.h"
12 #include "third_party/WebKit/public/web/WebFrame.h" 13 #include "third_party/WebKit/public/web/WebFrame.h"
13 14
14 namespace content { 15 namespace content {
15 16
16 ShellRenderFrameObserver::ShellRenderFrameObserver(RenderFrame* render_frame) 17 ShellRenderFrameObserver::ShellRenderFrameObserver(RenderFrame* render_frame)
17 : RenderFrameObserver(render_frame) { 18 : RenderFrameObserver(render_frame) {
18 }
19
20 void ShellRenderFrameObserver::WebFrameCreated(blink::WebFrame* frame) {
21 if (!CommandLine::ForCurrentProcess()->HasSwitch(switches::kDumpRenderTree)) 19 if (!CommandLine::ForCurrentProcess()->HasSwitch(switches::kDumpRenderTree))
22 return; 20 return;
23 frame->setPermissionClient( 21 render_frame->GetWebFrame()->setPermissionClient(
24 ShellRenderProcessObserver::GetInstance()->test_interfaces()->testRunner() 22 ShellRenderProcessObserver::GetInstance()->test_interfaces()->
25 ->webPermissions()); 23 testRunner()->webPermissions());
26 } 24 }
27 25
28 } // namespace content 26 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698