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

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

Issue 143823004: Implement DeviceLight (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebase after r172146 Created 6 years, 8 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/html/HTMLAppletElement.h" 46 #include "core/html/HTMLAppletElement.h"
47 #include "core/loader/DocumentLoader.h" 47 #include "core/loader/DocumentLoader.h"
48 #include "core/loader/FrameLoadRequest.h" 48 #include "core/loader/FrameLoadRequest.h"
49 #include "core/loader/FrameLoader.h" 49 #include "core/loader/FrameLoader.h"
50 #include "core/loader/HistoryItem.h" 50 #include "core/loader/HistoryItem.h"
51 #include "core/page/Chrome.h" 51 #include "core/page/Chrome.h"
52 #include "core/page/EventHandler.h" 52 #include "core/page/EventHandler.h"
53 #include "core/page/Page.h" 53 #include "core/page/Page.h"
54 #include "core/page/WindowFeatures.h" 54 #include "core/page/WindowFeatures.h"
55 #include "core/rendering/HitTestResult.h" 55 #include "core/rendering/HitTestResult.h"
56 #include "modules/device_light/DeviceLightController.h"
56 #include "modules/device_orientation/DeviceMotionController.h" 57 #include "modules/device_orientation/DeviceMotionController.h"
57 #include "modules/device_orientation/DeviceOrientationController.h" 58 #include "modules/device_orientation/DeviceOrientationController.h"
58 #include "modules/gamepad/NavigatorGamepad.h" 59 #include "modules/gamepad/NavigatorGamepad.h"
59 #include "modules/screen_orientation/ScreenOrientationController.h" 60 #include "modules/screen_orientation/ScreenOrientationController.h"
60 #include "platform/MIMETypeRegistry.h" 61 #include "platform/MIMETypeRegistry.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/network/SocketStreamHandleInternal.h" 66 #include "platform/network/SocketStreamHandleInternal.h"
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 { 113 {
113 } 114 }
114 115
115 void FrameLoaderClientImpl::dispatchDidClearWindowObjectInWorld(DOMWrapperWorld& world) 116 void FrameLoaderClientImpl::dispatchDidClearWindowObjectInWorld(DOMWrapperWorld& world)
116 { 117 {
117 if (m_webFrame->client()) { 118 if (m_webFrame->client()) {
118 m_webFrame->client()->didClearWindowObject(m_webFrame, world.worldId()); 119 m_webFrame->client()->didClearWindowObject(m_webFrame, world.worldId());
119 Document* document = m_webFrame->frame()->document(); 120 Document* document = m_webFrame->frame()->document();
120 if (document) { 121 if (document) {
121 WheelController::from(*document); 122 WheelController::from(*document);
123 if (RuntimeEnabledFeatures::deviceLightEnabled())
124 DeviceLightController::from(*document);
122 if (RuntimeEnabledFeatures::deviceMotionEnabled()) 125 if (RuntimeEnabledFeatures::deviceMotionEnabled())
123 DeviceMotionController::from(*document); 126 DeviceMotionController::from(*document);
124 if (RuntimeEnabledFeatures::deviceOrientationEnabled()) 127 if (RuntimeEnabledFeatures::deviceOrientationEnabled())
125 DeviceOrientationController::from(*document); 128 DeviceOrientationController::from(*document);
126 if (RuntimeEnabledFeatures::screenOrientationEnabled()) 129 if (RuntimeEnabledFeatures::screenOrientationEnabled())
127 ScreenOrientationController::from(*document); 130 ScreenOrientationController::from(*document);
128 if (RuntimeEnabledFeatures::gamepadEnabled()) 131 if (RuntimeEnabledFeatures::gamepadEnabled())
129 NavigatorGamepad::from(*document); 132 NavigatorGamepad::from(*document);
130 } 133 }
131 } 134 }
(...skipping 668 matching lines...) Expand 10 before | Expand all | Expand 10 after
800 return adoptPtr(m_webFrame->client()->createApplicationCacheHost(m_webFrame, client)); 803 return adoptPtr(m_webFrame->client()->createApplicationCacheHost(m_webFrame, client));
801 } 804 }
802 805
803 void FrameLoaderClientImpl::didStopAllLoaders() 806 void FrameLoaderClientImpl::didStopAllLoaders()
804 { 807 {
805 if (m_webFrame->client()) 808 if (m_webFrame->client())
806 m_webFrame->client()->didAbortLoading(m_webFrame); 809 m_webFrame->client()->didAbortLoading(m_webFrame);
807 } 810 }
808 811
809 } // namespace blink 812 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698