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

Side by Side Diff: third_party/WebKit/public/platform/Platform.h

Issue 1507023004: Harden the implementation of '--disable-web-security' (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: esprehn feedback Created 5 years 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 394 matching lines...) Expand 10 before | Expand all | Expand 10 after
405 virtual WebScrollbarBehavior* scrollbarBehavior() { return nullptr; } 405 virtual WebScrollbarBehavior* scrollbarBehavior() { return nullptr; }
406 406
407 407
408 // Sudden Termination -------------------------------------------------- 408 // Sudden Termination --------------------------------------------------
409 409
410 // Disable/Enable sudden termination on a process level. When possible, it 410 // Disable/Enable sudden termination on a process level. When possible, it
411 // is preferable to disable sudden termination on a per-frame level via 411 // is preferable to disable sudden termination on a per-frame level via
412 // WebFrameClient::suddenTerminationDisablerChanged. 412 // WebFrameClient::suddenTerminationDisablerChanged.
413 virtual void suddenTerminationChanged(bool enabled) { } 413 virtual void suddenTerminationChanged(bool enabled) { }
414 414
415
jochen (gone - plz use gerrit) 2015/12/10 15:39:33 unrelated?
416 // System -------------------------------------------------------------- 415 // System --------------------------------------------------------------
417 416
418 // Returns a value such as "en-US". 417 // Returns a value such as "en-US".
419 virtual WebString defaultLocale() { return WebString(); } 418 virtual WebString defaultLocale() { return WebString(); }
420 419
421 // Wall clock time in seconds since the epoch. 420 // Wall clock time in seconds since the epoch.
422 virtual double currentTimeSeconds() { return 0; } 421 virtual double currentTimeSeconds() { return 0; }
423 422
424 // Monotonically increasing time in seconds from an arbitrary fixed point in the past. 423 // Monotonically increasing time in seconds from an arbitrary fixed point in the past.
425 // This function is expected to return at least millisecond-precision values . For this reason, 424 // This function is expected to return at least millisecond-precision values . For this reason,
426 // it is recommended that the fixed point be no further in the past than the epoch. 425 // it is recommended that the fixed point be no further in the past than the epoch.
427 virtual double monotonicallyIncreasingTimeSeconds() { return 0; } 426 virtual double monotonicallyIncreasingTimeSeconds() { return 0; }
428 427
429 // System trace time in seconds. For example, on Chrome OS, this timestamp s hould be 428 // System trace time in seconds. For example, on Chrome OS, this timestamp s hould be
430 // synchronized with ftrace timestamps. 429 // synchronized with ftrace timestamps.
431 virtual double systemTraceTime() { return 0; } 430 virtual double systemTraceTime() { return 0; }
432 431
433 // WebKit clients must implement this funcion if they use cryptographic rand omness. 432 // WebKit clients must implement this funcion if they use cryptographic rand omness.
434 virtual void cryptographicallyRandomValues(unsigned char* buffer, size_t len gth) = 0; 433 virtual void cryptographicallyRandomValues(unsigned char* buffer, size_t len gth) = 0;
435 434
436 // Returns an interface to the main thread. Can be null if blink was initial ized on a thread without a message loop. 435 // Returns an interface to the main thread. Can be null if blink was initial ized on a thread without a message loop.
437 BLINK_PLATFORM_EXPORT WebThread* mainThread() const; 436 BLINK_PLATFORM_EXPORT WebThread* mainThread() const;
438 437
439 // Returns an interface to the compositor thread. This can be null if the 438 // Returns an interface to the compositor thread. This can be null if the
440 // renderer was created with threaded rendering desabled. 439 // renderer was created with threaded rendering desabled.
441 virtual WebThread* compositorThread() const { return 0; } 440 virtual WebThread* compositorThread() const { return 0; }
442 441
442 /// Verifies that the platform allows 'SecurityOrigin' objects to be granted universal access.
443 virtual bool canGrantUniversalAccess() { return false; }
444
443 // Vibration ----------------------------------------------------------- 445 // Vibration -----------------------------------------------------------
444 446
445 // Starts a vibration for the given duration in milliseconds. If there is cu rrently an active 447 // Starts a vibration for the given duration in milliseconds. If there is cu rrently an active
446 // vibration it will be cancelled before the new one is started. 448 // vibration it will be cancelled before the new one is started.
447 virtual void vibrate(unsigned time) { } 449 virtual void vibrate(unsigned time) { }
448 450
449 // Cancels the current vibration, if there is one. 451 // Cancels the current vibration, if there is one.
450 virtual void cancelVibration() { } 452 virtual void cancelVibration() { }
451 453
452 454
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after
747 protected: 749 protected:
748 BLINK_PLATFORM_EXPORT Platform(); 750 BLINK_PLATFORM_EXPORT Platform();
749 virtual ~Platform() { } 751 virtual ~Platform() { }
750 752
751 WebThread* m_mainThread; 753 WebThread* m_mainThread;
752 }; 754 };
753 755
754 } // namespace blink 756 } // namespace blink
755 757
756 #endif 758 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698