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 314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
325 // Invoked when the beforeunload handler fires. The time is from the renderer. | 325 // Invoked when the beforeunload handler fires. The time is from the renderer. |
326 virtual void BeforeUnloadFired(const base::TimeTicks& proceed_time) {} | 326 virtual void BeforeUnloadFired(const base::TimeTicks& proceed_time) {} |
327 | 327 |
328 // Invoked when a user cancels a before unload dialog. | 328 // Invoked when a user cancels a before unload dialog. |
329 virtual void BeforeUnloadDialogCancelled() {} | 329 virtual void BeforeUnloadDialogCancelled() {} |
330 | 330 |
331 // Invoked when an accessibility event is received from the renderer. | 331 // Invoked when an accessibility event is received from the renderer. |
332 virtual void AccessibilityEventReceived( | 332 virtual void AccessibilityEventReceived( |
333 const std::vector<AXEventNotificationDetails>& details) {} | 333 const std::vector<AXEventNotificationDetails>& details) {} |
334 | 334 |
335 // Invoked if an IPC message is coming from a specific RenderFrameHost. This | |
336 // handler is called for messages sent from renderers via RenderFrame::Send or | |
337 // RenderFrameObserver::Send. Such messages are not passed to the generic | |
338 // OnMessageReceived handler (derived from IPC::Listener) to avoid | |
339 // possibilities for cross-site interaction. | |
jam
2014/05/02 19:41:22
nit: remove "or RenderFrameObserver::Send" since t
mnaganov (inactive)
2014/05/06 09:06:46
Done.
| |
340 virtual bool OnMessageReceived(const IPC::Message& message, | |
341 RenderFrameHost* render_frame_host); | |
342 | |
335 // IPC::Listener implementation. | 343 // IPC::Listener implementation. |
336 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; | 344 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; |
337 | 345 |
338 // IPC::Sender implementation. | 346 // IPC::Sender implementation. |
339 virtual bool Send(IPC::Message* message) OVERRIDE; | 347 virtual bool Send(IPC::Message* message) OVERRIDE; |
340 int routing_id() const; | 348 int routing_id() const; |
341 | 349 |
342 protected: | 350 protected: |
343 // Use this constructor when the object is tied to a single WebContents for | 351 // Use this constructor when the object is tied to a single WebContents for |
344 // its entire lifetime. | 352 // its entire lifetime. |
(...skipping 19 matching lines...) Expand all Loading... | |
364 void WebContentsImplDestroyed(); | 372 void WebContentsImplDestroyed(); |
365 | 373 |
366 WebContentsImpl* web_contents_; | 374 WebContentsImpl* web_contents_; |
367 | 375 |
368 DISALLOW_COPY_AND_ASSIGN(WebContentsObserver); | 376 DISALLOW_COPY_AND_ASSIGN(WebContentsObserver); |
369 }; | 377 }; |
370 | 378 |
371 } // namespace content | 379 } // namespace content |
372 | 380 |
373 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_OBSERVER_H_ | 381 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_OBSERVER_H_ |
OLD | NEW |