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

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

Issue 848053002: Adding WebVR interface to Blink (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Addressed feedback from philipj@opera.com, rebased Created 5 years, 10 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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 #include "core/page/Chrome.h" 49 #include "core/page/Chrome.h"
50 #include "core/page/EventHandler.h" 50 #include "core/page/EventHandler.h"
51 #include "core/page/Page.h" 51 #include "core/page/Page.h"
52 #include "core/page/WindowFeatures.h" 52 #include "core/page/WindowFeatures.h"
53 #include "core/storage/DOMWindowStorageController.h" 53 #include "core/storage/DOMWindowStorageController.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/DeviceOrientationController.h" 56 #include "modules/device_orientation/DeviceOrientationController.h"
57 #include "modules/gamepad/NavigatorGamepad.h" 57 #include "modules/gamepad/NavigatorGamepad.h"
58 #include "modules/serviceworkers/NavigatorServiceWorker.h" 58 #include "modules/serviceworkers/NavigatorServiceWorker.h"
59 #include "modules/vr/NavigatorVRDevice.h"
59 #include "platform/MIMETypeRegistry.h" 60 #include "platform/MIMETypeRegistry.h"
60 #include "platform/RuntimeEnabledFeatures.h" 61 #include "platform/RuntimeEnabledFeatures.h"
61 #include "platform/UserGestureIndicator.h" 62 #include "platform/UserGestureIndicator.h"
62 #include "platform/exported/WrappedResourceRequest.h" 63 #include "platform/exported/WrappedResourceRequest.h"
63 #include "platform/exported/WrappedResourceResponse.h" 64 #include "platform/exported/WrappedResourceResponse.h"
64 #include "platform/network/HTTPParsers.h" 65 #include "platform/network/HTTPParsers.h"
65 #include "platform/plugins/PluginData.h" 66 #include "platform/plugins/PluginData.h"
66 #include "public/platform/Platform.h" 67 #include "public/platform/Platform.h"
67 #include "public/platform/WebApplicationCacheHost.h" 68 #include "public/platform/WebApplicationCacheHost.h"
68 #include "public/platform/WebMimeRegistry.h" 69 #include "public/platform/WebMimeRegistry.h"
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 { 121 {
121 if (m_webFrame->client()) { 122 if (m_webFrame->client()) {
122 m_webFrame->client()->didClearWindowObject(m_webFrame); 123 m_webFrame->client()->didClearWindowObject(m_webFrame);
123 Document* document = m_webFrame->frame()->document(); 124 Document* document = m_webFrame->frame()->document();
124 if (document) { 125 if (document) {
125 DeviceMotionController::from(*document); 126 DeviceMotionController::from(*document);
126 DeviceOrientationController::from(*document); 127 DeviceOrientationController::from(*document);
127 if (RuntimeEnabledFeatures::deviceLightEnabled()) 128 if (RuntimeEnabledFeatures::deviceLightEnabled())
128 DeviceLightController::from(*document); 129 DeviceLightController::from(*document);
129 NavigatorGamepad::from(*document); 130 NavigatorGamepad::from(*document);
131 NavigatorVRDevice::from(*document);
sof 2015/02/24 12:35:29 Doesn't this need to be conditionally enabled?
130 if (RuntimeEnabledFeatures::serviceWorkerEnabled()) 132 if (RuntimeEnabledFeatures::serviceWorkerEnabled())
131 NavigatorServiceWorker::from(*document); 133 NavigatorServiceWorker::from(*document);
132 DOMWindowStorageController::from(*document); 134 DOMWindowStorageController::from(*document);
133 } 135 }
134 } 136 }
135 // FIXME: when extensions go out of process, this whole concept stops workin g. 137 // FIXME: when extensions go out of process, this whole concept stops workin g.
136 WebDevToolsFrontendImpl* devToolsFrontend = m_webFrame->top()->isWebLocalFra me() ? toWebLocalFrameImpl(m_webFrame->top())->devToolsFrontend() : nullptr; 138 WebDevToolsFrontendImpl* devToolsFrontend = m_webFrame->top()->isWebLocalFra me() ? toWebLocalFrameImpl(m_webFrame->top())->devToolsFrontend() : nullptr;
137 if (devToolsFrontend) 139 if (devToolsFrontend)
138 devToolsFrontend->didClearWindowObject(m_webFrame); 140 devToolsFrontend->didClearWindowObject(m_webFrame);
139 } 141 }
(...skipping 797 matching lines...) Expand 10 before | Expand all | Expand 10 after
937 939
938 void FrameLoaderClientImpl::suddenTerminationDisablerChanged(bool present, Sudde nTerminationDisablerType type) 940 void FrameLoaderClientImpl::suddenTerminationDisablerChanged(bool present, Sudde nTerminationDisablerType type)
939 { 941 {
940 if (m_webFrame->client()) { 942 if (m_webFrame->client()) {
941 m_webFrame->client()->suddenTerminationDisablerChanged( 943 m_webFrame->client()->suddenTerminationDisablerChanged(
942 present, static_cast<WebFrameClient::SuddenTerminationDisablerType>( type)); 944 present, static_cast<WebFrameClient::SuddenTerminationDisablerType>( type));
943 } 945 }
944 } 946 }
945 947
946 } // namespace blink 948 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698