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

Unified Diff: content/public/android/java/src/org/chromium/content/browser/SelectActionModeCallback.java

Issue 1216853005: Fix theme inconsistencies for WebViews used in dialogs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Catch a more specific exception. Created 5 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/android/java/src/org/chromium/content/browser/SelectActionModeCallback.java
diff --git a/content/public/android/java/src/org/chromium/content/browser/SelectActionModeCallback.java b/content/public/android/java/src/org/chromium/content/browser/SelectActionModeCallback.java
index 3a88b64b8b4c7245df616053eed15d044248ce6b..98f9125e5230d34f4f3d96084d0512d387ba3c55 100644
--- a/content/public/android/java/src/org/chromium/content/browser/SelectActionModeCallback.java
+++ b/content/public/android/java/src/org/chromium/content/browser/SelectActionModeCallback.java
@@ -6,6 +6,7 @@ package org.chromium.content.browser;
import android.content.ClipboardManager;
import android.content.Context;
+import android.content.res.Resources;
import android.graphics.Rect;
import android.view.ActionMode;
import android.view.Menu;
@@ -142,7 +143,15 @@ public class SelectActionModeCallback implements ActionMode.Callback {
}
private void createActionMenu(ActionMode mode, Menu menu) {
- new MenuInflater(getContext()).inflate(R.menu.select_action_menu, menu);
+ try {
+ mode.getMenuInflater().inflate(R.menu.select_action_menu, menu);
+ } catch (Resources.NotFoundException e) {
+ // TODO(tobiasjs) by the time we get here we have already
+ // caused a resource loading failure to be logged. WebView
+ // resource access needs to be improved so that this
+ // logspam can be avoided.
+ new MenuInflater(getContext()).inflate(R.menu.select_action_menu, menu);
+ }
if (mIsInsertion) {
menu.removeItem(R.id.select_action_menu_select_all);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698