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

Side by Side Diff: android_webview/tools/WebViewShell/src/org/chromium/webview_shell/TelemetryActivity.java

Issue 1772353004: Fix blink_perf.canvas on Android WebView (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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 | « no previous file | 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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.webview_shell; 5 package org.chromium.webview_shell;
6 6
7 import android.app.Activity; 7 import android.app.Activity;
8 import android.content.Intent; 8 import android.content.Intent;
9 import android.os.Bundle; 9 import android.os.Bundle;
10 import android.webkit.CookieManager; 10 import android.webkit.CookieManager;
(...skipping 13 matching lines...) Expand all
24 getResources().getString(R.string.title_activity_telemetry)); 24 getResources().getString(R.string.title_activity_telemetry));
25 setContentView(R.layout.activity_webview); 25 setContentView(R.layout.activity_webview);
26 26
27 WebView webView = (WebView) findViewById(R.id.webview); 27 WebView webView = (WebView) findViewById(R.id.webview);
28 CookieManager.setAcceptFileSchemeCookies(true); 28 CookieManager.setAcceptFileSchemeCookies(true);
29 WebSettings settings = webView.getSettings(); 29 WebSettings settings = webView.getSettings();
30 settings.setJavaScriptEnabled(true); 30 settings.setJavaScriptEnabled(true);
31 settings.setUseWideViewPort(true); 31 settings.setUseWideViewPort(true);
32 settings.setLoadWithOverviewMode(true); 32 settings.setLoadWithOverviewMode(true);
33 settings.setDomStorageEnabled(true); 33 settings.setDomStorageEnabled(true);
34 34 settings.setMediaPlaybackRequiresUserGesture(false);
35 Intent intent = getIntent(); 35 Intent intent = getIntent();
36 String userAgentString = intent.getStringExtra("userAgent"); 36 String userAgentString = intent.getStringExtra("userAgent");
37 if (userAgentString != null) { 37 if (userAgentString != null) {
38 settings.setUserAgentString(userAgentString); 38 settings.setUserAgentString(userAgentString);
39 } 39 }
40 40
41 webView.setWebViewClient(new WebViewClient() { 41 webView.setWebViewClient(new WebViewClient() {
42 @Override 42 @Override
43 public boolean shouldOverrideUrlLoading(WebView webView, String url) { 43 public boolean shouldOverrideUrlLoading(WebView webView, String url) {
44 return false; 44 return false;
45 } 45 }
46 }); 46 });
47 47
48 webView.loadUrl("about:blank"); 48 webView.loadUrl("about:blank");
49 } 49 }
50 } 50 }
OLDNEW
« 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