| 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.content.browser; | 5 package org.chromium.content.browser; |
| 6 | 6 |
| 7 import android.content.ClipData; | 7 import android.content.ClipData; |
| 8 import android.content.ClipboardManager; | 8 import android.content.ClipboardManager; |
| 9 import android.content.Context; | 9 import android.content.Context; |
| 10 import android.content.Intent; | 10 import android.content.Intent; |
| (...skipping 688 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 699 } | 699 } |
| 700 } | 700 } |
| 701 }); | 701 }); |
| 702 } | 702 } |
| 703 | 703 |
| 704 private void requestFocusOnUiThread(final boolean gainFocus) { | 704 private void requestFocusOnUiThread(final boolean gainFocus) { |
| 705 final ContentViewCore contentViewCore = mContentViewCore; | 705 final ContentViewCore contentViewCore = mContentViewCore; |
| 706 ThreadUtils.runOnUiThreadBlocking(new Runnable() { | 706 ThreadUtils.runOnUiThreadBlocking(new Runnable() { |
| 707 @Override | 707 @Override |
| 708 public void run() { | 708 public void run() { |
| 709 contentViewCore.onFocusChanged(gainFocus); | 709 contentViewCore.onFocusChanged(gainFocus, true); |
| 710 } | 710 } |
| 711 }); | 711 }); |
| 712 } | 712 } |
| 713 | 713 |
| 714 private void copyStringToClipboard(String string) { | 714 private void copyStringToClipboard(String string) { |
| 715 ClipboardManager clipboardManager = | 715 ClipboardManager clipboardManager = |
| 716 (ClipboardManager) getActivity().getSystemService( | 716 (ClipboardManager) getActivity().getSystemService( |
| 717 Context.CLIPBOARD_SERVICE); | 717 Context.CLIPBOARD_SERVICE); |
| 718 ClipData clip = ClipData.newPlainText("test", string); | 718 ClipData clip = ClipData.newPlainText("test", string); |
| 719 clipboardManager.setPrimaryClip(clip); | 719 clipboardManager.setPrimaryClip(clip); |
| (...skipping 10 matching lines...) Expand all Loading... |
| 730 | 730 |
| 731 private void waitForInsertion(final boolean show) { | 731 private void waitForInsertion(final boolean show) { |
| 732 CriteriaHelper.pollUiThread(Criteria.equals(show, new Callable<Boolean>(
) { | 732 CriteriaHelper.pollUiThread(Criteria.equals(show, new Callable<Boolean>(
) { |
| 733 @Override | 733 @Override |
| 734 public Boolean call() { | 734 public Boolean call() { |
| 735 return mSelectionPopupController.isInsertion(); | 735 return mSelectionPopupController.isInsertion(); |
| 736 } | 736 } |
| 737 })); | 737 })); |
| 738 } | 738 } |
| 739 } | 739 } |
| OLD | NEW |