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 348 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
359 | 359 |
360 // Invoked when theme color is changed to |theme_color|. | 360 // Invoked when theme color is changed to |theme_color|. |
361 virtual void DidChangeThemeColor(SkColor theme_color) {} | 361 virtual void DidChangeThemeColor(SkColor theme_color) {} |
362 | 362 |
363 // Invoked when media is playing. | 363 // Invoked when media is playing. |
364 virtual void MediaStartedPlaying() {} | 364 virtual void MediaStartedPlaying() {} |
365 | 365 |
366 // Invoked when media is paused. | 366 // Invoked when media is paused. |
367 virtual void MediaPaused() {} | 367 virtual void MediaPaused() {} |
368 | 368 |
| 369 // Invoked when media session has changed its state. |
| 370 virtual void MediaSessionStateChanged(bool is_controllable, |
| 371 bool is_suspended) {} |
| 372 |
369 // Invoked if an IPC message is coming from a specific RenderFrameHost. | 373 // Invoked if an IPC message is coming from a specific RenderFrameHost. |
370 virtual bool OnMessageReceived(const IPC::Message& message, | 374 virtual bool OnMessageReceived(const IPC::Message& message, |
371 RenderFrameHost* render_frame_host); | 375 RenderFrameHost* render_frame_host); |
372 | 376 |
373 // Notification that |contents| has gained focus. | 377 // Notification that |contents| has gained focus. |
374 virtual void OnWebContentsFocused() {} | 378 virtual void OnWebContentsFocused() {} |
375 | 379 |
376 // IPC::Listener implementation. | 380 // IPC::Listener implementation. |
377 bool OnMessageReceived(const IPC::Message& message) override; | 381 bool OnMessageReceived(const IPC::Message& message) override; |
378 | 382 |
(...skipping 24 matching lines...) Expand all Loading... |
403 void ResetWebContents(); | 407 void ResetWebContents(); |
404 | 408 |
405 WebContentsImpl* web_contents_; | 409 WebContentsImpl* web_contents_; |
406 | 410 |
407 DISALLOW_COPY_AND_ASSIGN(WebContentsObserver); | 411 DISALLOW_COPY_AND_ASSIGN(WebContentsObserver); |
408 }; | 412 }; |
409 | 413 |
410 } // namespace content | 414 } // namespace content |
411 | 415 |
412 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_OBSERVER_H_ | 416 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_OBSERVER_H_ |
OLD | NEW |