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

Side by Side Diff: android_webview/test/shell/src/org/chromium/android_webview/test/AwTestRunnerActivity.java

Issue 1262393003: [Android WebView] Move browser-side initialization out from Application (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Comments addressed Created 5 years, 4 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 | « android_webview/test/shell/src/org/chromium/android_webview/shell/AwShellApplication.java ('k') | 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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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.android_webview.test; 5 package org.chromium.android_webview.test;
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.view.View; 10 import android.view.View;
11 import android.view.ViewGroup.LayoutParams; 11 import android.view.ViewGroup.LayoutParams;
12 import android.widget.LinearLayout; 12 import android.widget.LinearLayout;
13 13
14 import org.chromium.android_webview.AwBrowserProcess;
15 import org.chromium.android_webview.shell.AwShellResourceProvider;
16
14 /** 17 /**
15 * This is a lightweight activity for tests that only require WebView functional ity. 18 * This is a lightweight activity for tests that only require WebView functional ity.
16 */ 19 */
17 public class AwTestRunnerActivity extends Activity { 20 public class AwTestRunnerActivity extends Activity {
18 21
19 private LinearLayout mLinearLayout; 22 private LinearLayout mLinearLayout;
20 private Intent mLastSentIntent; 23 private Intent mLastSentIntent;
21 private boolean mIgnoreStartActivity; 24 private boolean mIgnoreStartActivity;
22 25
23 @Override 26 @Override
24 public void onCreate(Bundle savedInstanceState) { 27 public void onCreate(Bundle savedInstanceState) {
25 super.onCreate(savedInstanceState); 28 super.onCreate(savedInstanceState);
26 29
30 AwShellResourceProvider.registerResources(this);
31 AwBrowserProcess.loadLibrary(this);
32
27 mLinearLayout = new LinearLayout(this); 33 mLinearLayout = new LinearLayout(this);
28 mLinearLayout.setOrientation(LinearLayout.VERTICAL); 34 mLinearLayout.setOrientation(LinearLayout.VERTICAL);
29 mLinearLayout.setShowDividers(LinearLayout.SHOW_DIVIDER_MIDDLE); 35 mLinearLayout.setShowDividers(LinearLayout.SHOW_DIVIDER_MIDDLE);
30 mLinearLayout.setLayoutParams(new LayoutParams(LayoutParams.MATCH_PARENT , 36 mLinearLayout.setLayoutParams(new LayoutParams(LayoutParams.MATCH_PARENT ,
31 LayoutParams.MATCH_PARENT)); 37 LayoutParams.MATCH_PARENT));
32 38
33 setContentView(mLinearLayout); 39 setContentView(mLinearLayout);
34 } 40 }
35 41
36 public int getRootLayoutWidth() { 42 public int getRootLayoutWidth() {
(...skipping 23 matching lines...) Expand all
60 } 66 }
61 67
62 public Intent getLastSentIntent() { 68 public Intent getLastSentIntent() {
63 return mLastSentIntent; 69 return mLastSentIntent;
64 } 70 }
65 71
66 public void setIgnoreStartActivity(boolean ignore) { 72 public void setIgnoreStartActivity(boolean ignore) {
67 mIgnoreStartActivity = ignore; 73 mIgnoreStartActivity = ignore;
68 } 74 }
69 } 75 }
OLDNEW
« no previous file with comments | « android_webview/test/shell/src/org/chromium/android_webview/shell/AwShellApplication.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698