OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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 package org.chromium.content_public.browser; | 5 package org.chromium.content_public.browser; |
6 | 6 |
7 import java.lang.ref.WeakReference; | 7 import java.lang.ref.WeakReference; |
8 | 8 |
9 /** | 9 /** |
10 * This class receives callbacks that act as hooks for various a native web cont
ents events related | 10 * This class receives callbacks that act as hooks for various a native web cont
ents events related |
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
141 */ | 141 */ |
142 public void didChangeThemeColor(int color) {} | 142 public void didChangeThemeColor(int color) {} |
143 | 143 |
144 /** | 144 /** |
145 * Called when we started navigation to the pending entry. | 145 * Called when we started navigation to the pending entry. |
146 * @param url The URL that we are navigating to. | 146 * @param url The URL that we are navigating to. |
147 */ | 147 */ |
148 public void didStartNavigationToPendingEntry(String url) {} | 148 public void didStartNavigationToPendingEntry(String url) {} |
149 | 149 |
150 /** | 150 /** |
| 151 * Called when the media session state changed. |
| 152 * @param isControllable if the session can be resumed or suspended. |
| 153 * @param isSuspended if the session currently suspended or not |
| 154 */ |
| 155 public void mediaSessionStateChanged(boolean isControllable, boolean isSuspe
nded) {} |
| 156 |
| 157 /** |
151 * Stop observing the web contents and clean up associated references. | 158 * Stop observing the web contents and clean up associated references. |
152 */ | 159 */ |
153 public void destroy() { | 160 public void destroy() { |
154 if (mWebContents == null) return; | 161 if (mWebContents == null) return; |
155 final WebContents webContents = mWebContents.get(); | 162 final WebContents webContents = mWebContents.get(); |
156 mWebContents = null; | 163 mWebContents = null; |
157 if (webContents == null) return; | 164 if (webContents == null) return; |
158 webContents.removeObserver(this); | 165 webContents.removeObserver(this); |
159 } | 166 } |
160 | 167 |
161 protected WebContentsObserver() {} | 168 protected WebContentsObserver() {} |
162 } | 169 } |
OLD | NEW |