OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_BROWSER_WEB_CONTENTS_OBSERVER_H_ | 5 #ifndef CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_OBSERVER_H_ |
6 #define CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_OBSERVER_H_ | 6 #define CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_OBSERVER_H_ |
7 | 7 |
8 #include "base/process_util.h" | 8 #include "base/process_util.h" |
9 #include "content/common/content_export.h" | 9 #include "content/common/content_export.h" |
10 #include "content/public/browser/navigation_controller.h" | 10 #include "content/public/browser/navigation_controller.h" |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 const GURL& url, | 87 const GURL& url, |
88 const Referrer& referrer, | 88 const Referrer& referrer, |
89 WindowOpenDisposition disposition, | 89 WindowOpenDisposition disposition, |
90 PageTransition transition, | 90 PageTransition transition, |
91 int64 source_frame_id) {} | 91 int64 source_frame_id) {} |
92 | 92 |
93 virtual void AppCacheAccessed(const GURL& manifest_url, | 93 virtual void AppCacheAccessed(const GURL& manifest_url, |
94 bool blocked_by_policy) {} | 94 bool blocked_by_policy) {} |
95 | 95 |
96 // Invoked when the WebContents is being destroyed. Gives subclasses a chance | 96 // Invoked when the WebContents is being destroyed. Gives subclasses a chance |
97 // to cleanup. At the time this is invoked |tab_contents()| returns NULL. | 97 // to cleanup. At the time this is invoked |web_contents()| returns NULL. |
98 // It is safe to delete 'this' from here. | 98 // It is safe to delete 'this' from here. |
99 virtual void WebContentsDestroyed(WebContents* tab) {} | 99 virtual void WebContentsDestroyed(WebContents* web_contents) {} |
100 | 100 |
101 // IPC::Channel::Listener implementation. | 101 // IPC::Channel::Listener implementation. |
102 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; | 102 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; |
103 | 103 |
104 // IPC::Message::Sender implementation. | 104 // IPC::Message::Sender implementation. |
105 virtual bool Send(IPC::Message* message) OVERRIDE; | 105 virtual bool Send(IPC::Message* message) OVERRIDE; |
106 int routing_id() const; | 106 int routing_id() const; |
107 | 107 |
108 protected: | 108 protected: |
109 // Use this constructor when the object is tied to a single WebContents for | 109 // Use this constructor when the object is tied to a single WebContents for |
(...skipping 20 matching lines...) Expand all Loading... |
130 void WebContentsImplDestroyed(); | 130 void WebContentsImplDestroyed(); |
131 | 131 |
132 WebContentsImpl* web_contents_; | 132 WebContentsImpl* web_contents_; |
133 | 133 |
134 DISALLOW_COPY_AND_ASSIGN(WebContentsObserver); | 134 DISALLOW_COPY_AND_ASSIGN(WebContentsObserver); |
135 }; | 135 }; |
136 | 136 |
137 } // namespace content | 137 } // namespace content |
138 | 138 |
139 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_OBSERVER_H_ | 139 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_OBSERVER_H_ |
OLD | NEW |