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 | |
338 // IPC::Listener implementation. | 334 // IPC::Listener implementation. |
339 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; | 335 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; |
340 | 336 |
341 // IPC::Sender implementation. | 337 // IPC::Sender implementation. |
342 virtual bool Send(IPC::Message* message) OVERRIDE; | 338 virtual bool Send(IPC::Message* message) OVERRIDE; |
343 int routing_id() const; | 339 int routing_id() const; |
344 | 340 |
345 protected: | 341 protected: |
346 // Use this constructor when the object is tied to a single WebContents for | 342 // Use this constructor when the object is tied to a single WebContents for |
347 // its entire lifetime. | 343 // its entire lifetime. |
(...skipping 19 matching lines...) Expand all Loading... |
367 void WebContentsImplDestroyed(); | 363 void WebContentsImplDestroyed(); |
368 | 364 |
369 WebContentsImpl* web_contents_; | 365 WebContentsImpl* web_contents_; |
370 | 366 |
371 DISALLOW_COPY_AND_ASSIGN(WebContentsObserver); | 367 DISALLOW_COPY_AND_ASSIGN(WebContentsObserver); |
372 }; | 368 }; |
373 | 369 |
374 } // namespace content | 370 } // namespace content |
375 | 371 |
376 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_OBSERVER_H_ | 372 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_OBSERVER_H_ |
OLD | NEW |