| 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 com.android.webview.chromium; | 5 package com.android.webview.chromium; |
| 6 | 6 |
| 7 import android.annotation.SuppressLint; | 7 import android.annotation.SuppressLint; |
| 8 import android.annotation.TargetApi; | 8 import android.annotation.TargetApi; |
| 9 import android.content.Context; | 9 import android.content.Context; |
| 10 import android.content.Intent; | 10 import android.content.Intent; |
| (...skipping 1333 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1344 mFactory.startYourEngines(true); | 1344 mFactory.startYourEngines(true); |
| 1345 if (checkNeedsPost()) { | 1345 if (checkNeedsPost()) { |
| 1346 WebMessagePort[] ret = mFactory.runOnUiThreadBlocking(new Callable<W
ebMessagePort[]>() { | 1346 WebMessagePort[] ret = mFactory.runOnUiThreadBlocking(new Callable<W
ebMessagePort[]>() { |
| 1347 @Override | 1347 @Override |
| 1348 public WebMessagePort[] call() { | 1348 public WebMessagePort[] call() { |
| 1349 return createWebMessageChannel(); | 1349 return createWebMessageChannel(); |
| 1350 } | 1350 } |
| 1351 }); | 1351 }); |
| 1352 return ret; | 1352 return ret; |
| 1353 } | 1353 } |
| 1354 return WebMessagePortAdapter.fromAwMessagePorts(mAwContents.createMessag
eChannel()); | 1354 return WebMessagePortAdapter.fromAppWebMessagePorts(mAwContents.createMe
ssageChannel()); |
| 1355 } | 1355 } |
| 1356 | 1356 |
| 1357 @Override | 1357 @Override |
| 1358 @TargetApi(Build.VERSION_CODES.M) | 1358 @TargetApi(Build.VERSION_CODES.M) |
| 1359 public void postMessageToMainFrame(final WebMessage message, final Uri targe
tOrigin) { | 1359 public void postMessageToMainFrame(final WebMessage message, final Uri targe
tOrigin) { |
| 1360 if (checkNeedsPost()) { | 1360 if (checkNeedsPost()) { |
| 1361 mFactory.addTask(new Runnable() { | 1361 mFactory.addTask(new Runnable() { |
| 1362 @Override | 1362 @Override |
| 1363 public void run() { | 1363 public void run() { |
| 1364 postMessageToMainFrame(message, targetOrigin); | 1364 postMessageToMainFrame(message, targetOrigin); |
| 1365 } | 1365 } |
| 1366 }); | 1366 }); |
| 1367 return; | 1367 return; |
| 1368 } | 1368 } |
| 1369 mAwContents.postMessageToFrame(null, message.getData(), targetOrigin.toS
tring(), | 1369 mAwContents.postMessageToFrame(null, message.getData(), targetOrigin.toS
tring(), |
| 1370 WebMessagePortAdapter.toAwMessagePorts(message.getPorts())); | 1370 WebMessagePortAdapter.toAppWebMessagePorts(message.getPorts())); |
| 1371 } | 1371 } |
| 1372 | 1372 |
| 1373 @Override | 1373 @Override |
| 1374 public WebSettings getSettings() { | 1374 public WebSettings getSettings() { |
| 1375 return mWebSettings; | 1375 return mWebSettings; |
| 1376 } | 1376 } |
| 1377 | 1377 |
| 1378 @Override | 1378 @Override |
| 1379 public void setMapTrackballToArrowKeys(boolean setMap) { | 1379 public void setMapTrackballToArrowKeys(boolean setMap) { |
| 1380 // This is a deprecated API: intentional no-op. | 1380 // This is a deprecated API: intentional no-op. |
| (...skipping 893 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2274 mAwContents.extractSmartClipData(x, y, width, height); | 2274 mAwContents.extractSmartClipData(x, y, width, height); |
| 2275 } | 2275 } |
| 2276 | 2276 |
| 2277 // Implements SmartClipProvider | 2277 // Implements SmartClipProvider |
| 2278 @Override | 2278 @Override |
| 2279 public void setSmartClipResultHandler(final Handler resultHandler) { | 2279 public void setSmartClipResultHandler(final Handler resultHandler) { |
| 2280 checkThread(); | 2280 checkThread(); |
| 2281 mAwContents.setSmartClipResultHandler(resultHandler); | 2281 mAwContents.setSmartClipResultHandler(resultHandler); |
| 2282 } | 2282 } |
| 2283 } | 2283 } |
| OLD | NEW |