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

Side by Side Diff: ui/android/java/src/org/chromium/ui/UiUtils.java

Issue 2239453002: [Android] Make it possible to show Infobar in native pages (Second Try) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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 | « chrome/android/java/src/org/chromium/chrome/browser/tab/TabContentViewParent.java ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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.ui; 5 package org.chromium.ui;
6 6
7 import android.content.Context; 7 import android.content.Context;
8 import android.graphics.Bitmap; 8 import android.graphics.Bitmap;
9 import android.graphics.Canvas; 9 import android.graphics.Canvas;
10 import android.graphics.Rect; 10 import android.graphics.Rect;
(...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after
326 * 326 *
327 * @param context The application context. 327 * @param context The application context.
328 * @param file image capture file. 328 * @param file image capture file.
329 * @return URI for |file|. 329 * @return URI for |file|.
330 */ 330 */
331 public static Uri getUriForImageCaptureFile(Context context, File file) { 331 public static Uri getUriForImageCaptureFile(Context context, File file) {
332 return Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR2 332 return Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR2
333 ? ContentUriUtils.getContentUriFromFile(context, file) 333 ? ContentUriUtils.getContentUriFromFile(context, file)
334 : Uri.fromFile(file); 334 : Uri.fromFile(file);
335 } 335 }
336
337 /**
338 * Removes the view from its parent {@link ViewGroup}. No-op if the {@link V iew} is not yet
339 * attached to the view hierarchy.
340 *
341 * @param view The view to be removed from the parent.
342 */
343 public static void removeViewFromParent(View view) {
344 ViewGroup parent = (ViewGroup) view.getParent();
345 if (parent == null) return;
346 parent.removeView(view);
347 }
336 } 348 }
OLDNEW
« no previous file with comments | « chrome/android/java/src/org/chromium/chrome/browser/tab/TabContentViewParent.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698