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

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

Issue 339343003: Cleanup Blink's Platform from Screen Orientation stuff. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 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 26 matching lines...) Expand all
37 37
38 #include "WebAudioDevice.h" 38 #include "WebAudioDevice.h"
39 #include "WebCommon.h" 39 #include "WebCommon.h"
40 #include "WebData.h" 40 #include "WebData.h"
41 #include "WebGamepadListener.h" 41 #include "WebGamepadListener.h"
42 #include "WebGamepads.h" 42 #include "WebGamepads.h"
43 #include "WebGestureDevice.h" 43 #include "WebGestureDevice.h"
44 #include "WebGraphicsContext3D.h" 44 #include "WebGraphicsContext3D.h"
45 #include "WebLocalizedString.h" 45 #include "WebLocalizedString.h"
46 #include "WebLockOrientationCallback.h" 46 #include "WebLockOrientationCallback.h"
47 #include "WebScreenOrientationLockType.h"
48 #include "WebScreenOrientationType.h"
49 #include "WebSpeechSynthesizer.h" 47 #include "WebSpeechSynthesizer.h"
50 #include "WebStorageQuotaCallbacks.h" 48 #include "WebStorageQuotaCallbacks.h"
51 #include "WebStorageQuotaType.h" 49 #include "WebStorageQuotaType.h"
52 #include "WebString.h" 50 #include "WebString.h"
53 #include "WebURLError.h" 51 #include "WebURLError.h"
54 #include "WebVector.h" 52 #include "WebVector.h"
55 53
56 class GrContext; 54 class GrContext;
57 55
58 namespace blink { 56 namespace blink {
(...skipping 25 matching lines...) Expand all
84 class WebMediaStreamCenter; 82 class WebMediaStreamCenter;
85 class WebMediaStreamCenterClient; 83 class WebMediaStreamCenterClient;
86 class WebMessagePortChannel; 84 class WebMessagePortChannel;
87 class WebMimeRegistry; 85 class WebMimeRegistry;
88 class WebPluginListBuilder; 86 class WebPluginListBuilder;
89 class WebPrescientNetworking; 87 class WebPrescientNetworking;
90 class WebPublicSuffixList; 88 class WebPublicSuffixList;
91 class WebRTCPeerConnectionHandler; 89 class WebRTCPeerConnectionHandler;
92 class WebRTCPeerConnectionHandlerClient; 90 class WebRTCPeerConnectionHandlerClient;
93 class WebSandboxSupport; 91 class WebSandboxSupport;
94 class WebScreenOrientationListener;
95 class WebScrollbarBehavior; 92 class WebScrollbarBehavior;
96 class WebSocketHandle; 93 class WebSocketHandle;
97 class WebSocketStreamHandle; 94 class WebSocketStreamHandle;
98 class WebSpeechSynthesizer; 95 class WebSpeechSynthesizer;
99 class WebSpeechSynthesizerClient; 96 class WebSpeechSynthesizerClient;
100 class WebStorageNamespace; 97 class WebStorageNamespace;
101 struct WebFloatPoint; 98 struct WebFloatPoint;
102 class WebThemeEngine; 99 class WebThemeEngine;
103 class WebThread; 100 class WebThread;
104 class WebURL; 101 class WebURL;
(...skipping 520 matching lines...) Expand 10 before | Expand all | Expand 10 after
625 622
626 // Sets a Listener to listen for device orientation data updates. 623 // Sets a Listener to listen for device orientation data updates.
627 // If null, the platform stops providing device orientation data to the curr ent listener. 624 // If null, the platform stops providing device orientation data to the curr ent listener.
628 virtual void setDeviceOrientationListener(blink::WebDeviceOrientationListene r*) { } 625 virtual void setDeviceOrientationListener(blink::WebDeviceOrientationListene r*) { }
629 626
630 // Sets a Listener to listen for device light data updates. 627 // Sets a Listener to listen for device light data updates.
631 // If null, the platform stops providing device light data to the current li stener. 628 // If null, the platform stops providing device light data to the current li stener.
632 virtual void setDeviceLightListener(blink::WebDeviceLightListener*) { } 629 virtual void setDeviceLightListener(blink::WebDeviceLightListener*) { }
633 630
634 631
635 // Screen Orientation -------------------------------------------------
636 // FIXME: this is meant to be removed when the content layer will be updated .
637
638 virtual void lockOrientation(WebScreenOrientationLockType) { }
639 // Request a screen orientation lock and pass a |callback| object to be used
640 // to notify of success/failure. The |callback| parameter is expected to be
641 // owned by the implementation.
642 virtual void lockOrientation(WebScreenOrientationLockType orientation, WebLo ckOrientationCallback* callback)
643 {
644 // FIXME: remove this when
645 // lockOrientation(orientation, callback) will be handled in Chromium.
646 lockOrientation(orientation);
647
648 delete callback; // prevents memory leak if there is no implementation.
649 }
650 virtual void unlockOrientation() { }
651
652
653 // Quota ----------------------------------------------------------- 632 // Quota -----------------------------------------------------------
654 633
655 // Queries the storage partition's storage usage and quota information. 634 // Queries the storage partition's storage usage and quota information.
656 // WebStorageQuotaCallbacks::didQueryStorageUsageAndQuota will be called 635 // WebStorageQuotaCallbacks::didQueryStorageUsageAndQuota will be called
657 // with the current usage and quota information for the partition. When 636 // with the current usage and quota information for the partition. When
658 // an error occurs WebStorageQuotaCallbacks::didFail is called with an 637 // an error occurs WebStorageQuotaCallbacks::didFail is called with an
659 // error code. 638 // error code.
660 virtual void queryStorageUsageAndQuota( 639 virtual void queryStorageUsageAndQuota(
661 const WebURL& storagePartition, 640 const WebURL& storagePartition,
662 WebStorageQuotaType, 641 WebStorageQuotaType,
663 WebStorageQuotaCallbacks) { } 642 WebStorageQuotaCallbacks) { }
664 643
665 644
666 // WebDatabase -------------------------------------------------------- 645 // WebDatabase --------------------------------------------------------
667 646
668 virtual WebDatabaseObserver* databaseObserver() { return 0; } 647 virtual WebDatabaseObserver* databaseObserver() { return 0; }
669 648
670 649
671 protected: 650 protected:
672 virtual ~Platform() { } 651 virtual ~Platform() { }
673 }; 652 };
674 653
675 } // namespace blink 654 } // namespace blink
676 655
677 #endif 656 #endif
OLDNEW
« no previous file with comments | « Source/modules/screen_orientation/ScreenOrientationController.cpp ('k') | public/platform/WebScreenOrientationListener.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698