| 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 <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 427 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 438 // Invoked before a form repost warning is shown. | 438 // Invoked before a form repost warning is shown. |
| 439 virtual void BeforeFormRepostWarningShow() {} | 439 virtual void BeforeFormRepostWarningShow() {} |
| 440 | 440 |
| 441 // Invoked when the beforeunload handler fires. The time is from the renderer | 441 // Invoked when the beforeunload handler fires. The time is from the renderer |
| 442 // process. | 442 // process. |
| 443 virtual void BeforeUnloadFired(const base::TimeTicks& proceed_time) {} | 443 virtual void BeforeUnloadFired(const base::TimeTicks& proceed_time) {} |
| 444 | 444 |
| 445 // Invoked when a user cancels a before unload dialog. | 445 // Invoked when a user cancels a before unload dialog. |
| 446 virtual void BeforeUnloadDialogCancelled() {} | 446 virtual void BeforeUnloadDialogCancelled() {} |
| 447 | 447 |
| 448 // Invoked when an accessibility event is received from the renderer process. | 448 // Called when accessibility events or location changes are received |
| 449 // from a render frame, but only when the accessibility mode has the |
| 450 // ACCESSIBILITY_MODE_FLAG_WEB_CONTENTS flag set. |
| 449 virtual void AccessibilityEventReceived( | 451 virtual void AccessibilityEventReceived( |
| 450 const std::vector<AXEventNotificationDetails>& details) {} | 452 const std::vector<AXEventNotificationDetails>& details) {} |
| 451 | |
| 452 // Invoked when an accessibility location change is received from the | |
| 453 // renderer process. | |
| 454 virtual void AccessibilityLocationChangesReceived( | 453 virtual void AccessibilityLocationChangesReceived( |
| 455 const std::vector<AXLocationChangeNotificationDetails>& details) {} | 454 const std::vector<AXLocationChangeNotificationDetails>& details) {} |
| 456 | 455 |
| 457 // Invoked when theme color is changed to |theme_color|. | 456 // Invoked when theme color is changed to |theme_color|. |
| 458 virtual void DidChangeThemeColor(SkColor theme_color) {} | 457 virtual void DidChangeThemeColor(SkColor theme_color) {} |
| 459 | 458 |
| 460 // Invoked when media is playing or paused. |id| is unique per player and per | 459 // Invoked when media is playing or paused. |id| is unique per player and per |
| 461 // RenderFrameHost. There may be multiple players within a RenderFrameHost | 460 // RenderFrameHost. There may be multiple players within a RenderFrameHost |
| 462 // and subsequently within a WebContents. MediaStartedPlaying() will always | 461 // and subsequently within a WebContents. MediaStartedPlaying() will always |
| 463 // be followed by MediaStoppedPlaying() after player teardown. Observers must | 462 // be followed by MediaStoppedPlaying() after player teardown. Observers must |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 512 void ResetWebContents(); | 511 void ResetWebContents(); |
| 513 | 512 |
| 514 WebContentsImpl* web_contents_; | 513 WebContentsImpl* web_contents_; |
| 515 | 514 |
| 516 DISALLOW_COPY_AND_ASSIGN(WebContentsObserver); | 515 DISALLOW_COPY_AND_ASSIGN(WebContentsObserver); |
| 517 }; | 516 }; |
| 518 | 517 |
| 519 } // namespace content | 518 } // namespace content |
| 520 | 519 |
| 521 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_OBSERVER_H_ | 520 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_OBSERVER_H_ |
| OLD | NEW |