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 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
119 // it's used for anything in case there's an exploited renderer. | 119 // it's used for anything in case there's an exploited renderer. |
120 virtual void PluginHungStatusChanged(int plugin_child_id, | 120 virtual void PluginHungStatusChanged(int plugin_child_id, |
121 const FilePath& plugin_path, | 121 const FilePath& plugin_path, |
122 bool is_hung) {} | 122 bool is_hung) {} |
123 | 123 |
124 // Invoked when the WebContents is being destroyed. Gives subclasses a chance | 124 // Invoked when the WebContents is being destroyed. Gives subclasses a chance |
125 // to cleanup. At the time this is invoked |web_contents()| returns NULL. | 125 // to cleanup. At the time this is invoked |web_contents()| returns NULL. |
126 // It is safe to delete 'this' from here. | 126 // It is safe to delete 'this' from here. |
127 virtual void WebContentsDestroyed(WebContents* web_contents) {} | 127 virtual void WebContentsDestroyed(WebContents* web_contents) {} |
128 | 128 |
| 129 // Called when the user agent override for a WebContents has been changed. |
| 130 virtual void UserAgentOverrideSet(const std::string& user_agent) {} |
| 131 |
129 // IPC::Listener implementation. | 132 // IPC::Listener implementation. |
130 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; | 133 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; |
131 | 134 |
132 // IPC::Sender implementation. | 135 // IPC::Sender implementation. |
133 virtual bool Send(IPC::Message* message) OVERRIDE; | 136 virtual bool Send(IPC::Message* message) OVERRIDE; |
134 int routing_id() const; | 137 int routing_id() const; |
135 | 138 |
136 protected: | 139 protected: |
137 // Use this constructor when the object is tied to a single WebContents for | 140 // Use this constructor when the object is tied to a single WebContents for |
138 // its entire lifetime. | 141 // its entire lifetime. |
(...skipping 19 matching lines...) Expand all Loading... |
158 void WebContentsImplDestroyed(); | 161 void WebContentsImplDestroyed(); |
159 | 162 |
160 WebContentsImpl* web_contents_; | 163 WebContentsImpl* web_contents_; |
161 | 164 |
162 DISALLOW_COPY_AND_ASSIGN(WebContentsObserver); | 165 DISALLOW_COPY_AND_ASSIGN(WebContentsObserver); |
163 }; | 166 }; |
164 | 167 |
165 } // namespace content | 168 } // namespace content |
166 | 169 |
167 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_OBSERVER_H_ | 170 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_OBSERVER_H_ |
OLD | NEW |