OLD | NEW |
---|---|
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.content.browser; | 5 package org.chromium.content.browser; |
6 | 6 |
7 import org.chromium.base.CalledByNative; | 7 import org.chromium.base.CalledByNative; |
8 import org.chromium.base.JNINamespace; | 8 import org.chromium.base.JNINamespace; |
9 import org.chromium.content_public.Referrer; | 9 import org.chromium.content_public.Referrer; |
10 | 10 |
(...skipping 29 matching lines...) Expand all Loading... | |
40 int mLoadUrlType; | 40 int mLoadUrlType; |
41 int mTransitionType; | 41 int mTransitionType; |
42 Referrer mReferrer; | 42 Referrer mReferrer; |
43 private Map<String, String> mExtraHeaders; | 43 private Map<String, String> mExtraHeaders; |
44 private String mVerbatimHeaders; | 44 private String mVerbatimHeaders; |
45 int mUaOverrideOption; | 45 int mUaOverrideOption; |
46 byte[] mPostData; | 46 byte[] mPostData; |
47 String mBaseUrlForDataUrl; | 47 String mBaseUrlForDataUrl; |
48 String mVirtualUrlForDataUrl; | 48 String mVirtualUrlForDataUrl; |
49 boolean mCanLoadLocalResources; | 49 boolean mCanLoadLocalResources; |
50 boolean mIsRendererInitiated; | |
50 | 51 |
51 /** | 52 /** |
52 * Creates an instance with default page transition type. | 53 * Creates an instance with default page transition type. |
53 * @param url the url to be loaded | 54 * @param url the url to be loaded |
54 */ | 55 */ |
55 public LoadUrlParams(String url) { | 56 public LoadUrlParams(String url) { |
56 this(url, PageTransitionTypes.PAGE_TRANSITION_LINK); | 57 this(url, PageTransitionTypes.PAGE_TRANSITION_LINK); |
57 } | 58 } |
58 | 59 |
59 /** | 60 /** |
(...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
352 * defaults to false. | 353 * defaults to false. |
353 */ | 354 */ |
354 public void setCanLoadLocalResources(boolean canLoad) { | 355 public void setCanLoadLocalResources(boolean canLoad) { |
355 mCanLoadLocalResources = canLoad; | 356 mCanLoadLocalResources = canLoad; |
356 } | 357 } |
357 | 358 |
358 public int getLoadUrlType() { | 359 public int getLoadUrlType() { |
359 return mLoadUrlType; | 360 return mLoadUrlType; |
360 } | 361 } |
361 | 362 |
363 /** | |
364 * @param rendererInitiated Whether or not this load was initiated from a re nderer or not. | |
Ted C
2014/05/15 00:57:00
the trailing or not isn't needed here (or the foll
David Trainor- moved to gerrit
2014/05/15 18:22:14
Done.
| |
365 */ | |
366 public void setIsRendererInitiated(boolean rendererInitiated) { | |
367 mIsRendererInitiated = rendererInitiated; | |
368 } | |
369 | |
370 /** | |
371 * @return Whether or not this load was initiated from a renderer or not. | |
372 */ | |
373 public boolean getIsRendererInitiated() { | |
374 return mIsRendererInitiated; | |
375 } | |
376 | |
362 public boolean isBaseUrlDataScheme() { | 377 public boolean isBaseUrlDataScheme() { |
363 // If there's no base url set, but this is a data load then | 378 // If there's no base url set, but this is a data load then |
364 // treat the scheme as data:. | 379 // treat the scheme as data:. |
365 if (mBaseUrlForDataUrl == null && mLoadUrlType == LOAD_TYPE_DATA) { | 380 if (mBaseUrlForDataUrl == null && mLoadUrlType == LOAD_TYPE_DATA) { |
366 return true; | 381 return true; |
367 } | 382 } |
368 return nativeIsDataScheme(mBaseUrlForDataUrl); | 383 return nativeIsDataScheme(mBaseUrlForDataUrl); |
369 } | 384 } |
370 | 385 |
371 @SuppressWarnings("unused") | 386 @SuppressWarnings("unused") |
(...skipping 12 matching lines...) Expand all Loading... | |
384 assert UA_OVERRIDE_FALSE == ua_override_false; | 399 assert UA_OVERRIDE_FALSE == ua_override_false; |
385 assert UA_OVERRIDE_TRUE == ua_override_true; | 400 assert UA_OVERRIDE_TRUE == ua_override_true; |
386 } | 401 } |
387 | 402 |
388 /** | 403 /** |
389 * Parses |url| as a GURL on the native side, and | 404 * Parses |url| as a GURL on the native side, and |
390 * returns true if it's scheme is data:. | 405 * returns true if it's scheme is data:. |
391 */ | 406 */ |
392 private static native boolean nativeIsDataScheme(String url); | 407 private static native boolean nativeIsDataScheme(String url); |
393 } | 408 } |
OLD | NEW |