OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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.chrome.browser; | 5 package org.chromium.chrome.browser; |
6 | 6 |
7 import android.app.Activity; | 7 import android.app.Activity; |
8 import android.content.Context; | 8 import android.content.Context; |
9 import android.graphics.Bitmap; | 9 import android.graphics.Bitmap; |
10 import android.graphics.Color; | 10 import android.graphics.Color; |
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
161 | 161 |
162 @Override | 162 @Override |
163 public void onSaveToClipboard(String text, boolean isUrl) { | 163 public void onSaveToClipboard(String text, boolean isUrl) { |
164 mClipboard.setText(text, text); | 164 mClipboard.setText(text, text); |
165 } | 165 } |
166 | 166 |
167 @Override | 167 @Override |
168 public void onSaveImageToClipboard(String url) { | 168 public void onSaveImageToClipboard(String url) { |
169 mClipboard.setHTMLText("<img src=\"" + url + "\">", url, url); | 169 mClipboard.setHTMLText("<img src=\"" + url + "\">", url, url); |
170 } | 170 } |
| 171 |
| 172 @Override |
| 173 public String getPageUrl() { |
| 174 return getUrl(); |
| 175 } |
171 } | 176 } |
172 | 177 |
173 /** | 178 /** |
174 * A basic {@link ChromeWebContentsDelegateAndroid} that forwards some calls
to the registered | 179 * A basic {@link ChromeWebContentsDelegateAndroid} that forwards some calls
to the registered |
175 * {@link TabObserver}s. Meant to be overridden by subclasses. | 180 * {@link TabObserver}s. Meant to be overridden by subclasses. |
176 */ | 181 */ |
177 public class TabChromeWebContentsDelegateAndroid | 182 public class TabChromeWebContentsDelegateAndroid |
178 extends ChromeWebContentsDelegateAndroid { | 183 extends ChromeWebContentsDelegateAndroid { |
179 @Override | 184 @Override |
180 public void onLoadProgressChanged(int progress) { | 185 public void onLoadProgressChanged(int progress) { |
(...skipping 964 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1145 private native WebContents nativeGetWebContents(long nativeTabAndroid); | 1150 private native WebContents nativeGetWebContents(long nativeTabAndroid); |
1146 private native Profile nativeGetProfileAndroid(long nativeTabAndroid); | 1151 private native Profile nativeGetProfileAndroid(long nativeTabAndroid); |
1147 private native int nativeLoadUrl(long nativeTabAndroid, String url, String e
xtraHeaders, | 1152 private native int nativeLoadUrl(long nativeTabAndroid, String url, String e
xtraHeaders, |
1148 byte[] postData, int transition, String referrerUrl, int referrerPol
icy, | 1153 byte[] postData, int transition, String referrerUrl, int referrerPol
icy, |
1149 boolean isRendererInitiated); | 1154 boolean isRendererInitiated); |
1150 private native int nativeGetSecurityLevel(long nativeTabAndroid); | 1155 private native int nativeGetSecurityLevel(long nativeTabAndroid); |
1151 private native void nativeSetActiveNavigationEntryTitleForUrl(long nativeTab
Android, String url, | 1156 private native void nativeSetActiveNavigationEntryTitleForUrl(long nativeTab
Android, String url, |
1152 String title); | 1157 String title); |
1153 private native boolean nativePrint(long nativeTabAndroid); | 1158 private native boolean nativePrint(long nativeTabAndroid); |
1154 } | 1159 } |
OLD | NEW |