Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(389)

Side by Side Diff: chrome/android/java/src/org/chromium/chrome/browser/tab/Tab.java

Issue 2628943003: Add metrics for triggering of JS dialogs on Android. (Closed)
Patch Set: Log only for confirm dialog Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | chrome/browser/android/tab_android.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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.tab; 5 package org.chromium.chrome.browser.tab;
6 6
7 import android.annotation.SuppressLint; 7 import android.annotation.SuppressLint;
8 import android.app.Activity; 8 import android.app.Activity;
9 import android.app.Application; 9 import android.app.Application;
10 import android.content.Context; 10 import android.content.Context;
11 import android.content.Intent; 11 import android.content.Intent;
12 import android.content.res.Resources; 12 import android.content.res.Resources;
13 import android.graphics.Bitmap; 13 import android.graphics.Bitmap;
14 import android.graphics.Color; 14 import android.graphics.Color;
15 import android.graphics.Rect; 15 import android.graphics.Rect;
16 import android.net.Uri; 16 import android.net.Uri;
17 import android.os.Bundle; 17 import android.os.Bundle;
18 import android.provider.Browser; 18 import android.provider.Browser;
19 import android.support.annotation.Nullable; 19 import android.support.annotation.Nullable;
20 import android.support.v4.view.ViewCompat;
20 import android.text.TextUtils; 21 import android.text.TextUtils;
21 import android.util.Log; 22 import android.util.Log;
22 import android.view.ContextThemeWrapper; 23 import android.view.ContextThemeWrapper;
23 import android.view.View; 24 import android.view.View;
24 import android.view.View.OnClickListener; 25 import android.view.View.OnClickListener;
25 import android.view.ViewGroup; 26 import android.view.ViewGroup;
26 import android.view.accessibility.AccessibilityEvent; 27 import android.view.accessibility.AccessibilityEvent;
27 import android.widget.FrameLayout; 28 import android.widget.FrameLayout;
28 import android.widget.FrameLayout.LayoutParams; 29 import android.widget.FrameLayout.LayoutParams;
29 30
(...skipping 2201 matching lines...) Expand 10 before | Expand all | Expand 10 after
2231 } 2232 }
2232 2233
2233 /** 2234 /**
2234 * @return Whether or not the tab is hidden. 2235 * @return Whether or not the tab is hidden.
2235 */ 2236 */
2236 public boolean isHidden() { 2237 public boolean isHidden() {
2237 return mIsHidden; 2238 return mIsHidden;
2238 } 2239 }
2239 2240
2240 /** 2241 /**
2242 * @return Whether the tab can currently be interacted with by the user. Th is requires the
2243 * view to be visible and in a state the user can manipulate the tab (i.e. not in
2244 * something like the phone tab switcher).
gone 2017/01/13 18:54:37 How does this work for a tablet, where the tab mig
Ted C 2017/01/20 16:57:46 Updated the comment to clarify the tab's view need
2245 */
2246 @CalledByNative
2247 public boolean isUserInteractable() {
2248 return !mIsHidden && ViewCompat.isAttachedToWindow(getView());
2249 }
2250
2251 /**
2241 * @return Whether or not the tab is in the closing process. 2252 * @return Whether or not the tab is in the closing process.
2242 */ 2253 */
2243 public boolean isClosing() { 2254 public boolean isClosing() {
2244 return mIsClosing; 2255 return mIsClosing;
2245 } 2256 }
2246 2257
2247 /** 2258 /**
2248 * @param closing Whether or not the tab is in the closing process. 2259 * @param closing Whether or not the tab is in the closing process.
2249 */ 2260 */
2250 public void setClosing(boolean closing) { 2261 public void setClosing(boolean closing) {
(...skipping 949 matching lines...) Expand 10 before | Expand all | Expand 10 after
3200 private native void nativeLoadOriginalImage(long nativeTabAndroid); 3211 private native void nativeLoadOriginalImage(long nativeTabAndroid);
3201 private native long nativeGetBookmarkId(long nativeTabAndroid, boolean onlyE ditable); 3212 private native long nativeGetBookmarkId(long nativeTabAndroid, boolean onlyE ditable);
3202 private native boolean nativeIsOfflinePage(long nativeTabAndroid); 3213 private native boolean nativeIsOfflinePage(long nativeTabAndroid);
3203 private native OfflinePageItem nativeGetOfflinePage(long nativeTabAndroid); 3214 private native OfflinePageItem nativeGetOfflinePage(long nativeTabAndroid);
3204 private native void nativeSetInterceptNavigationDelegate(long nativeTabAndro id, 3215 private native void nativeSetInterceptNavigationDelegate(long nativeTabAndro id,
3205 InterceptNavigationDelegate delegate); 3216 InterceptNavigationDelegate delegate);
3206 private native void nativeAttachToTabContentManager(long nativeTabAndroid, 3217 private native void nativeAttachToTabContentManager(long nativeTabAndroid,
3207 TabContentManager tabContentManager); 3218 TabContentManager tabContentManager);
3208 private native boolean nativeHasPrerenderedUrl(long nativeTabAndroid, String url); 3219 private native boolean nativeHasPrerenderedUrl(long nativeTabAndroid, String url);
3209 } 3220 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/android/tab_android.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698