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

Side by Side Diff: content/browser/frame_host/render_frame_host_delegate.h

Issue 217183004: Migrate addMessageToConsole API to RenderFrame. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase + fix the test_runner Created 6 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 | 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 #ifndef CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_DELEGATE_H_ 5 #ifndef CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_DELEGATE_H_
6 #define CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_DELEGATE_H_ 6 #define CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_DELEGATE_H_
7 7
8 #include "base/basictypes.h"
8 #include "content/common/content_export.h" 9 #include "content/common/content_export.h"
9 10
11 class GURL;
12
10 namespace IPC { 13 namespace IPC {
11 class Message; 14 class Message;
12 } 15 }
13 16
14 namespace content { 17 namespace content {
15 class RenderFrameHost; 18 class RenderFrameHost;
16 class WebContents; 19 class WebContents;
17 struct ContextMenuParams; 20 struct ContextMenuParams;
18 21
19 // An interface implemented by an object interested in knowing about the state 22 // An interface implemented by an object interested in knowing about the state
20 // of the RenderFrameHost. 23 // of the RenderFrameHost.
21 class CONTENT_EXPORT RenderFrameHostDelegate { 24 class CONTENT_EXPORT RenderFrameHostDelegate {
22 public: 25 public:
23 // This is used to give the delegate a chance to filter IPC messages. 26 // This is used to give the delegate a chance to filter IPC messages.
24 virtual bool OnMessageReceived(RenderFrameHost* render_frame_host, 27 virtual bool OnMessageReceived(RenderFrameHost* render_frame_host,
25 const IPC::Message& message); 28 const IPC::Message& message);
26 29
30 // Gets the last committed URL. See WebContents::GetLastCommittedURL for a
31 // description of the semantics.
32 virtual const GURL& GetMainFrameLastCommittedURL() const;
33
34 // A message was added to to the console.
35 virtual bool AddMessageToConsole(int32 level,
36 const base::string16& message,
37 int32 line_no,
38 const base::string16& source_id);
39
27 // Informs the delegate whenever a RenderFrameHost is created. 40 // Informs the delegate whenever a RenderFrameHost is created.
28 virtual void RenderFrameCreated(RenderFrameHost* render_frame_host) {} 41 virtual void RenderFrameCreated(RenderFrameHost* render_frame_host) {}
29 42
30 // Informs the delegate whenever a RenderFrameHost is deleted. 43 // Informs the delegate whenever a RenderFrameHost is deleted.
31 virtual void RenderFrameDeleted(RenderFrameHost* render_frame_host) {} 44 virtual void RenderFrameDeleted(RenderFrameHost* render_frame_host) {}
32 45
33 // The top-level RenderFrame began loading a new page. This corresponds to 46 // The top-level RenderFrame began loading a new page. This corresponds to
34 // Blink's notion of the throbber starting. 47 // Blink's notion of the throbber starting.
35 // |to_different_document| will be true unless the load is a fragment 48 // |to_different_document| will be true unless the load is a fragment
36 // navigation, or triggered by history.pushState/replaceState. 49 // navigation, or triggered by history.pushState/replaceState.
(...skipping 19 matching lines...) Expand all
56 // not a WebContents, returns NULL. 69 // not a WebContents, returns NULL.
57 virtual WebContents* GetAsWebContents(); 70 virtual WebContents* GetAsWebContents();
58 71
59 protected: 72 protected:
60 virtual ~RenderFrameHostDelegate() {} 73 virtual ~RenderFrameHostDelegate() {}
61 }; 74 };
62 75
63 } // namespace content 76 } // namespace content
64 77
65 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_DELEGATE_H_ 78 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_DELEGATE_H_
OLDNEW
« no previous file with comments | « content/browser/frame_host/interstitial_page_impl.cc ('k') | content/browser/frame_host/render_frame_host_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698