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/kill.h" | 8 #include "base/process/kill.h" |
9 #include "base/process/process_handle.h" | 9 #include "base/process/process_handle.h" |
10 #include "content/common/content_export.h" | 10 #include "content/common/content_export.h" |
(...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
324 // Invoked when the beforeunload handler fires. The time is from the renderer. | 324 // Invoked when the beforeunload handler fires. The time is from the renderer. |
325 virtual void BeforeUnloadFired(const base::TimeTicks& proceed_time) {} | 325 virtual void BeforeUnloadFired(const base::TimeTicks& proceed_time) {} |
326 | 326 |
327 // Invoked when a user cancels a before unload dialog. | 327 // Invoked when a user cancels a before unload dialog. |
328 virtual void BeforeUnloadDialogCancelled() {} | 328 virtual void BeforeUnloadDialogCancelled() {} |
329 | 329 |
330 // Invoked when an accessibility event is received from the renderer. | 330 // Invoked when an accessibility event is received from the renderer. |
331 virtual void AccessibilityEventReceived( | 331 virtual void AccessibilityEventReceived( |
332 const std::vector<AXEventNotificationDetails>& details) {} | 332 const std::vector<AXEventNotificationDetails>& details) {} |
333 | 333 |
| 334 // Invoked if an IPC message is coming from a specific RenderFrameHost. |
| 335 virtual bool OnMessageReceived(const IPC::Message& message, |
| 336 RenderFrameHost* render_frame_host); |
| 337 |
334 // IPC::Listener implementation. | 338 // IPC::Listener implementation. |
335 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; | 339 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; |
336 | 340 |
337 // IPC::Sender implementation. | 341 // IPC::Sender implementation. |
338 virtual bool Send(IPC::Message* message) OVERRIDE; | 342 virtual bool Send(IPC::Message* message) OVERRIDE; |
339 int routing_id() const; | 343 int routing_id() const; |
340 | 344 |
341 protected: | 345 protected: |
342 // Use this constructor when the object is tied to a single WebContents for | 346 // Use this constructor when the object is tied to a single WebContents for |
343 // its entire lifetime. | 347 // its entire lifetime. |
(...skipping 19 matching lines...) Expand all Loading... |
363 void WebContentsImplDestroyed(); | 367 void WebContentsImplDestroyed(); |
364 | 368 |
365 WebContentsImpl* web_contents_; | 369 WebContentsImpl* web_contents_; |
366 | 370 |
367 DISALLOW_COPY_AND_ASSIGN(WebContentsObserver); | 371 DISALLOW_COPY_AND_ASSIGN(WebContentsObserver); |
368 }; | 372 }; |
369 | 373 |
370 } // namespace content | 374 } // namespace content |
371 | 375 |
372 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_OBSERVER_H_ | 376 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_OBSERVER_H_ |
OLD | NEW |