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

Side by Side Diff: content/public/renderer/render_frame_observer.h

Issue 137463002: RenderFrame: flesh out Observer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lkgr
Patch Set: Smash changesets together 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
« no previous file with comments | « chrome/renderer/net/net_error_helper.cc ('k') | content/renderer/render_frame_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #ifndef CONTENT_PUBLIC_RENDERER_RENDER_FRAME_OBSERVER_H_ 5 #ifndef CONTENT_PUBLIC_RENDERER_RENDER_FRAME_OBSERVER_H_
6 #define CONTENT_PUBLIC_RENDERER_RENDER_FRAME_OBSERVER_H_ 6 #define CONTENT_PUBLIC_RENDERER_RENDER_FRAME_OBSERVER_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "content/common/content_export.h" 10 #include "content/common/content_export.h"
11 #include "ipc/ipc_listener.h" 11 #include "ipc/ipc_listener.h"
12 #include "ipc/ipc_sender.h" 12 #include "ipc/ipc_sender.h"
13 13
14 namespace blink { 14 namespace blink {
15 class WebDataSource;
15 class WebFrame; 16 class WebFrame;
17 class WebURLError;
16 } 18 }
17 19
18 namespace content { 20 namespace content {
19 21
20 class RendererPpapiHost; 22 class RendererPpapiHost;
21 class RenderFrame; 23 class RenderFrame;
22 class RenderFrameImpl; 24 class RenderFrameImpl;
23 25
24 // Base class for objects that want to filter incoming IPCs, and also get 26 // Base class for objects that want to filter incoming IPCs, and also get
25 // notified of changes to the frame. 27 // notified of changes to the frame.
26 class CONTENT_EXPORT RenderFrameObserver : public IPC::Listener, 28 class CONTENT_EXPORT RenderFrameObserver : public IPC::Listener,
27 public IPC::Sender { 29 public IPC::Sender {
28 public: 30 public:
29 // By default, observers will be deleted when the RenderFrame goes away. If 31 // By default, observers will be deleted when the RenderFrame goes away. If
30 // they want to outlive it, they can override this function. 32 // they want to outlive it, they can override this function.
31 virtual void OnDestruct(); 33 virtual void OnDestruct();
32 34
33 // Called when a Pepper plugin is created. 35 // Called when a Pepper plugin is created.
34 virtual void DidCreatePepperPlugin(RendererPpapiHost* host) {} 36 virtual void DidCreatePepperPlugin(RendererPpapiHost* host) {}
35 37
36 // These match the Blink API notifications 38 // These match the Blink API notifications
39 virtual void DidCreateDataSource(blink::WebFrame* frame,
jam 2014/01/16 22:17:08 i don't see this being used in the new helper? let
40 blink::WebDataSource* data_source) { }
37 virtual void DidCommitProvisionalLoad(blink::WebFrame* frame, 41 virtual void DidCommitProvisionalLoad(blink::WebFrame* frame,
38 bool is_new_navigation) {} 42 bool is_new_navigation) {}
43 virtual void DidStartProvisionalLoad(blink::WebFrame* frame) { }
jam 2014/01/16 22:17:08 in the new methods, can you remove the blink::WebF
44 virtual void DidFailProvisionalLoad(blink::WebFrame* frame,
jam 2014/01/16 22:17:08 ditto
45 const blink::WebURLError& error) { }
46 virtual void DidFinishLoad(blink::WebFrame* frame) { }
39 47
40 // IPC::Listener implementation. 48 // IPC::Listener implementation.
41 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; 49 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
42 50
43 // IPC::Sender implementation. 51 // IPC::Sender implementation.
44 virtual bool Send(IPC::Message* message) OVERRIDE; 52 virtual bool Send(IPC::Message* message) OVERRIDE;
45 53
46 RenderFrame* render_frame() const; 54 RenderFrame* render_frame() const;
47 int routing_id() const { return routing_id_; } 55 int routing_id() const { return routing_id_; }
48 56
(...skipping 11 matching lines...) Expand all
60 RenderFrame* render_frame_; 68 RenderFrame* render_frame_;
61 // The routing ID of the associated RenderFrame. 69 // The routing ID of the associated RenderFrame.
62 int routing_id_; 70 int routing_id_;
63 71
64 DISALLOW_COPY_AND_ASSIGN(RenderFrameObserver); 72 DISALLOW_COPY_AND_ASSIGN(RenderFrameObserver);
65 }; 73 };
66 74
67 } // namespace content 75 } // namespace content
68 76
69 #endif // CONTENT_PUBLIC_RENDERER_RENDER_FRAME_OBSERVER_H_ 77 #endif // CONTENT_PUBLIC_RENDERER_RENDER_FRAME_OBSERVER_H_
OLDNEW
« no previous file with comments | « chrome/renderer/net/net_error_helper.cc ('k') | content/renderer/render_frame_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698