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

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

Issue 15724023: Vibration API: use runtime flag, change from client to platform. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Make supplementName() private and delete isActive(). Created 7 years, 6 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
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 365 matching lines...) Expand 10 before | Expand all | Expand 10 after
376 virtual void setSharedTimerFireInterval(double) { } 376 virtual void setSharedTimerFireInterval(double) { }
377 virtual void stopSharedTimer() { } 377 virtual void stopSharedTimer() { }
378 378
379 // Callable from a background WebKit thread. 379 // Callable from a background WebKit thread.
380 virtual void callOnMainThread(void (*func)(void*), void* context) { } 380 virtual void callOnMainThread(void (*func)(void*), void* context) { }
381 381
382 // Checks the partition/volume where fileName resides. 382 // Checks the partition/volume where fileName resides.
383 virtual long long availableDiskSpaceInBytes(const WebString& fileName) { ret urn 0; } 383 virtual long long availableDiskSpaceInBytes(const WebString& fileName) { ret urn 0; }
384 384
385 385
386 // Vibration -----------------------------------------------------------
387
388 // Starts a vibration for the given duration in milliseconds. If there is cu rrently an active
389 // vibration it will be cancelled before the new one is started.
390 virtual void vibrate(unsigned time) { }
391
392 // Cancels the current vibration, if there is one.
393 virtual void cancelVibration() { }
394
395
386 // Testing ------------------------------------------------------------- 396 // Testing -------------------------------------------------------------
387 397
388 #define HAVE_WEBUNITTESTSUPPORT 1 398 #define HAVE_WEBUNITTESTSUPPORT 1
389 // Get a pointer to testing support interfaces. Will not be available in pro duction builds. 399 // Get a pointer to testing support interfaces. Will not be available in pro duction builds.
390 virtual WebUnitTestSupport* unitTestSupport() { return 0; } 400 virtual WebUnitTestSupport* unitTestSupport() { return 0; }
391 401
392 402
393 // Tracing ------------------------------------------------------------- 403 // Tracing -------------------------------------------------------------
394 404
395 // Get a pointer to the enabled state of the given trace category. The 405 // Get a pointer to the enabled state of the given trace category. The
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
523 // If null, the platform stops providing device motion data to the current l istener. 533 // If null, the platform stops providing device motion data to the current l istener.
524 virtual void setDeviceMotionListener(WebKit::WebDeviceMotionListener*) { } 534 virtual void setDeviceMotionListener(WebKit::WebDeviceMotionListener*) { }
525 535
526 protected: 536 protected:
527 virtual ~Platform() { } 537 virtual ~Platform() { }
528 }; 538 };
529 539
530 } // namespace WebKit 540 } // namespace WebKit
531 541
532 #endif 542 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698