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

Side by Side Diff: blimp/client/app/android/java/src/org/chromium/blimp/BlimpRendererActivity.java

Issue 1931583004: Prevent Blimp from reloading default URL on resume from minimized state (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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.blimp; 5 package org.chromium.blimp;
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.text.TextUtils; 10 import android.text.TextUtils;
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 mWebInputBox.initialize(mBlimpClientSession); 158 mWebInputBox.initialize(mBlimpClientSession);
159 159
160 mTabControlFeature = new TabControlFeature(mBlimpClientSession, mBlimpVi ew); 160 mTabControlFeature = new TabControlFeature(mBlimpClientSession, mBlimpVi ew);
161 161
162 handleUrl(getUrlFromIntent(getIntent())); 162 handleUrl(getUrlFromIntent(getIntent()));
163 } 163 }
164 164
165 @Override 165 @Override
166 protected void onNewIntent(Intent intent) { 166 protected void onNewIntent(Intent intent) {
167 super.onNewIntent(intent); 167 super.onNewIntent(intent);
168 handleUrl(getUrlFromIntent(intent)); 168 if (getUrlFromIntent(intent) != null) {
Khushal 2016/04/29 04:37:30 This is making the code really hard to follow. Let
shaktisahu 2016/05/03 19:47:28 Done.
169 handleUrl(getUrlFromIntent(intent));
170 }
169 } 171 }
170 172
171 /** 173 /**
172 * Retrieve the URL from the Intent. 174 * Retrieve the URL from the Intent.
173 * @param intent Intent to examine. 175 * @param intent Intent to examine.
174 * @return URL from the Intent, or null if a valid URL couldn't be found. 176 * @return URL from the Intent, or null if a valid URL couldn't be found.
175 */ 177 */
176 private String getUrlFromIntent(Intent intent) { 178 private String getUrlFromIntent(Intent intent) {
177 if (intent == null) return null; 179 if (intent == null) return null;
178 180
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
230 } 232 }
231 233
232 @Override 234 @Override
233 public void onDisconnected(String reason) { 235 public void onDisconnected(String reason) {
234 Toast.makeText(this, 236 Toast.makeText(this,
235 String.format(getResources().getString(R.string.network_dis connected), reason), 237 String.format(getResources().getString(R.string.network_dis connected), reason),
236 Toast.LENGTH_LONG) 238 Toast.LENGTH_LONG)
237 .show(); 239 .show();
238 } 240 }
239 } 241 }
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