| 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 1323 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1334 mFactory.startYourEngines(true); | 1334 mFactory.startYourEngines(true); |
| 1335 if (checkNeedsPost()) { | 1335 if (checkNeedsPost()) { |
| 1336 WebMessagePort[] ret = mFactory.runOnUiThreadBlocking(new Callable<W
ebMessagePort[]>() { | 1336 WebMessagePort[] ret = mFactory.runOnUiThreadBlocking(new Callable<W
ebMessagePort[]>() { |
| 1337 @Override | 1337 @Override |
| 1338 public WebMessagePort[] call() { | 1338 public WebMessagePort[] call() { |
| 1339 return createWebMessageChannel(); | 1339 return createWebMessageChannel(); |
| 1340 } | 1340 } |
| 1341 }); | 1341 }); |
| 1342 return ret; | 1342 return ret; |
| 1343 } | 1343 } |
| 1344 return WebMessagePortAdapter.fromAwMessagePorts(mAwContents.createMessag
eChannel()); | 1344 return WebMessagePortAdapter.fromAppWebMessagePorts(mAwContents.createMe
ssageChannel()); |
| 1345 } | 1345 } |
| 1346 | 1346 |
| 1347 @Override | 1347 @Override |
| 1348 @TargetApi(Build.VERSION_CODES.M) | 1348 @TargetApi(Build.VERSION_CODES.M) |
| 1349 public void postMessageToMainFrame(final WebMessage message, final Uri targe
tOrigin) { | 1349 public void postMessageToMainFrame(final WebMessage message, final Uri targe
tOrigin) { |
| 1350 if (checkNeedsPost()) { | 1350 if (checkNeedsPost()) { |
| 1351 mFactory.addTask(new Runnable() { | 1351 mFactory.addTask(new Runnable() { |
| 1352 @Override | 1352 @Override |
| 1353 public void run() { | 1353 public void run() { |
| 1354 postMessageToMainFrame(message, targetOrigin); | 1354 postMessageToMainFrame(message, targetOrigin); |
| 1355 } | 1355 } |
| 1356 }); | 1356 }); |
| 1357 return; | 1357 return; |
| 1358 } | 1358 } |
| 1359 mAwContents.postMessageToFrame(null, message.getData(), targetOrigin.toS
tring(), | 1359 mAwContents.postMessageToFrame(null, message.getData(), targetOrigin.toS
tring(), |
| 1360 WebMessagePortAdapter.toAwMessagePorts(message.getPorts())); | 1360 WebMessagePortAdapter.toAppWebMessagePorts(message.getPorts())); |
| 1361 } | 1361 } |
| 1362 | 1362 |
| 1363 @Override | 1363 @Override |
| 1364 public WebSettings getSettings() { | 1364 public WebSettings getSettings() { |
| 1365 return mWebSettings; | 1365 return mWebSettings; |
| 1366 } | 1366 } |
| 1367 | 1367 |
| 1368 @Override | 1368 @Override |
| 1369 public void setMapTrackballToArrowKeys(boolean setMap) { | 1369 public void setMapTrackballToArrowKeys(boolean setMap) { |
| 1370 // This is a deprecated API: intentional no-op. | 1370 // This is a deprecated API: intentional no-op. |
| (...skipping 893 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2264 mAwContents.extractSmartClipData(x, y, width, height); | 2264 mAwContents.extractSmartClipData(x, y, width, height); |
| 2265 } | 2265 } |
| 2266 | 2266 |
| 2267 // Implements SmartClipProvider | 2267 // Implements SmartClipProvider |
| 2268 @Override | 2268 @Override |
| 2269 public void setSmartClipResultHandler(final Handler resultHandler) { | 2269 public void setSmartClipResultHandler(final Handler resultHandler) { |
| 2270 checkThread(); | 2270 checkThread(); |
| 2271 mAwContents.setSmartClipResultHandler(resultHandler); | 2271 mAwContents.setSmartClipResultHandler(resultHandler); |
| 2272 } | 2272 } |
| 2273 } | 2273 } |
| OLD | NEW |