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

Side by Side Diff: third_party/WebKit/Source/web/FrameLoaderClientImpl.cpp

Issue 1416123002: Absolute Device Orientation API: blink implementation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 years, 2 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) 2009, 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2009, 2012 Google Inc. All rights reserved.
3 * Copyright (C) 2011 Apple Inc. All rights reserved. 3 * Copyright (C) 2011 Apple Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are 6 * modification, are permitted provided that the following conditions are
7 * met: 7 * met:
8 * 8 *
9 * * Redistributions of source code must retain the above copyright 9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 #include "core/input/EventHandler.h" 46 #include "core/input/EventHandler.h"
47 #include "core/layout/HitTestResult.h" 47 #include "core/layout/HitTestResult.h"
48 #include "core/loader/DocumentLoader.h" 48 #include "core/loader/DocumentLoader.h"
49 #include "core/loader/FrameLoadRequest.h" 49 #include "core/loader/FrameLoadRequest.h"
50 #include "core/loader/FrameLoader.h" 50 #include "core/loader/FrameLoader.h"
51 #include "core/loader/HistoryItem.h" 51 #include "core/loader/HistoryItem.h"
52 #include "core/page/Page.h" 52 #include "core/page/Page.h"
53 #include "core/page/WindowFeatures.h" 53 #include "core/page/WindowFeatures.h"
54 #include "modules/device_light/DeviceLightController.h" 54 #include "modules/device_light/DeviceLightController.h"
55 #include "modules/device_orientation/DeviceMotionController.h" 55 #include "modules/device_orientation/DeviceMotionController.h"
56 #include "modules/device_orientation/DeviceOrientationAbsoluteController.h"
56 #include "modules/device_orientation/DeviceOrientationController.h" 57 #include "modules/device_orientation/DeviceOrientationController.h"
57 #include "modules/encryptedmedia/HTMLMediaElementEncryptedMedia.h" 58 #include "modules/encryptedmedia/HTMLMediaElementEncryptedMedia.h"
58 #include "modules/gamepad/NavigatorGamepad.h" 59 #include "modules/gamepad/NavigatorGamepad.h"
59 #include "modules/serviceworkers/NavigatorServiceWorker.h" 60 #include "modules/serviceworkers/NavigatorServiceWorker.h"
60 #include "modules/storage/DOMWindowStorageController.h" 61 #include "modules/storage/DOMWindowStorageController.h"
61 #include "modules/vr/NavigatorVRDevice.h" 62 #include "modules/vr/NavigatorVRDevice.h"
62 #include "platform/MIMETypeRegistry.h" 63 #include "platform/MIMETypeRegistry.h"
63 #include "platform/RuntimeEnabledFeatures.h" 64 #include "platform/RuntimeEnabledFeatures.h"
64 #include "platform/UserGestureIndicator.h" 65 #include "platform/UserGestureIndicator.h"
65 #include "platform/exported/WrappedResourceRequest.h" 66 #include "platform/exported/WrappedResourceRequest.h"
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 } 130 }
130 131
131 void FrameLoaderClientImpl::dispatchDidClearWindowObjectInMainWorld() 132 void FrameLoaderClientImpl::dispatchDidClearWindowObjectInMainWorld()
132 { 133 {
133 if (m_webFrame->client()) { 134 if (m_webFrame->client()) {
134 m_webFrame->client()->didClearWindowObject(m_webFrame); 135 m_webFrame->client()->didClearWindowObject(m_webFrame);
135 Document* document = m_webFrame->frame()->document(); 136 Document* document = m_webFrame->frame()->document();
136 if (document) { 137 if (document) {
137 DeviceMotionController::from(*document); 138 DeviceMotionController::from(*document);
138 DeviceOrientationController::from(*document); 139 DeviceOrientationController::from(*document);
140 if (RuntimeEnabledFeatures::deviceOrientationAbsoluteEnabled())
141 DeviceOrientationAbsoluteController::from(*document);
139 if (RuntimeEnabledFeatures::deviceLightEnabled()) 142 if (RuntimeEnabledFeatures::deviceLightEnabled())
140 DeviceLightController::from(*document); 143 DeviceLightController::from(*document);
141 NavigatorGamepad::from(*document); 144 NavigatorGamepad::from(*document);
142 NavigatorServiceWorker::from(*document); 145 NavigatorServiceWorker::from(*document);
143 DOMWindowStorageController::from(*document); 146 DOMWindowStorageController::from(*document);
144 if (RuntimeEnabledFeatures::webVREnabled()) 147 if (RuntimeEnabledFeatures::webVREnabled())
145 NavigatorVRDevice::from(*document); 148 NavigatorVRDevice::from(*document);
146 } 149 }
147 } 150 }
148 // FIXME: when extensions go out of process, this whole concept stops workin g. 151 // FIXME: when extensions go out of process, this whole concept stops workin g.
(...skipping 805 matching lines...) Expand 10 before | Expand all | Expand 10 after
954 957
955 void FrameLoaderClientImpl::suddenTerminationDisablerChanged(bool present, Sudde nTerminationDisablerType type) 958 void FrameLoaderClientImpl::suddenTerminationDisablerChanged(bool present, Sudde nTerminationDisablerType type)
956 { 959 {
957 if (m_webFrame->client()) { 960 if (m_webFrame->client()) {
958 m_webFrame->client()->suddenTerminationDisablerChanged( 961 m_webFrame->client()->suddenTerminationDisablerChanged(
959 present, static_cast<WebFrameClient::SuddenTerminationDisablerType>( type)); 962 present, static_cast<WebFrameClient::SuddenTerminationDisablerType>( type));
960 } 963 }
961 } 964 }
962 965
963 } // namespace blink 966 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698