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

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

Issue 2801823003: [Presentation API] Change connection to 'connected' if start a presentation with "https://www.googl… (Closed)
Patch Set: resolve code review comments from Derek Created 3 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
« no previous file with comments | « third_party/WebKit/Source/modules/presentation/PresentationReceiver.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 #include "core/origin_trials/OriginTrials.h" 52 #include "core/origin_trials/OriginTrials.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 "modules/audio_output_devices/HTMLMediaElementAudioOutputDevice.h" 55 #include "modules/audio_output_devices/HTMLMediaElementAudioOutputDevice.h"
56 #include "modules/device_light/DeviceLightController.h" 56 #include "modules/device_light/DeviceLightController.h"
57 #include "modules/device_orientation/DeviceMotionController.h" 57 #include "modules/device_orientation/DeviceMotionController.h"
58 #include "modules/device_orientation/DeviceOrientationAbsoluteController.h" 58 #include "modules/device_orientation/DeviceOrientationAbsoluteController.h"
59 #include "modules/device_orientation/DeviceOrientationController.h" 59 #include "modules/device_orientation/DeviceOrientationController.h"
60 #include "modules/encryptedmedia/HTMLMediaElementEncryptedMedia.h" 60 #include "modules/encryptedmedia/HTMLMediaElementEncryptedMedia.h"
61 #include "modules/gamepad/NavigatorGamepad.h" 61 #include "modules/gamepad/NavigatorGamepad.h"
62 #include "modules/presentation/PresentationReceiver.h"
62 #include "modules/remoteplayback/HTMLMediaElementRemotePlayback.h" 63 #include "modules/remoteplayback/HTMLMediaElementRemotePlayback.h"
63 #include "modules/remoteplayback/RemotePlayback.h" 64 #include "modules/remoteplayback/RemotePlayback.h"
64 #include "modules/serviceworkers/NavigatorServiceWorker.h" 65 #include "modules/serviceworkers/NavigatorServiceWorker.h"
65 #include "modules/serviceworkers/ServiceWorkerLinkResource.h" 66 #include "modules/serviceworkers/ServiceWorkerLinkResource.h"
66 #include "modules/storage/DOMWindowStorageController.h" 67 #include "modules/storage/DOMWindowStorageController.h"
67 #include "modules/vr/NavigatorVR.h" 68 #include "modules/vr/NavigatorVR.h"
68 #include "platform/Histogram.h" 69 #include "platform/Histogram.h"
69 #include "platform/RuntimeEnabledFeatures.h" 70 #include "platform/RuntimeEnabledFeatures.h"
70 #include "platform/UserGestureIndicator.h" 71 #include "platform/UserGestureIndicator.h"
71 #include "platform/exported/WrappedResourceRequest.h" 72 #include "platform/exported/WrappedResourceRequest.h"
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 DeviceOrientationController::from(*document); 154 DeviceOrientationController::from(*document);
154 DeviceOrientationAbsoluteController::from(*document); 155 DeviceOrientationAbsoluteController::from(*document);
155 if (RuntimeEnabledFeatures::deviceLightEnabled()) 156 if (RuntimeEnabledFeatures::deviceLightEnabled())
156 DeviceLightController::from(*document); 157 DeviceLightController::from(*document);
157 NavigatorGamepad::from(*document); 158 NavigatorGamepad::from(*document);
158 NavigatorServiceWorker::from(*document); 159 NavigatorServiceWorker::from(*document);
159 DOMWindowStorageController::from(*document); 160 DOMWindowStorageController::from(*document);
160 if (RuntimeEnabledFeatures::webVREnabled() || 161 if (RuntimeEnabledFeatures::webVREnabled() ||
161 OriginTrials::webVREnabled(document->getExecutionContext())) 162 OriginTrials::webVREnabled(document->getExecutionContext()))
162 NavigatorVR::from(*document); 163 NavigatorVR::from(*document);
164 if (RuntimeEnabledFeatures::presentationEnabled() &&
165 m_webFrame->frame()->settings()->getPresentationReceiver()) {
166 PresentationReceiver::from(*document);
mlamouri (slow - plz ping) 2017/04/11 13:10:16 nit: can you either add a comment explaining that
mark a. foltz 2017/04/11 17:34:07 I asked Bin to implement this to be consistent wit
zhaobin 2017/04/11 17:43:59 Added a comment :) Mark suggested naming the func
167 }
163 } 168 }
164 } 169 }
165 // FIXME: when extensions go out of process, this whole concept stops working. 170 // FIXME: when extensions go out of process, this whole concept stops working.
166 WebDevToolsFrontendImpl* devToolsFrontend = 171 WebDevToolsFrontendImpl* devToolsFrontend =
167 m_webFrame->top()->isWebLocalFrame() 172 m_webFrame->top()->isWebLocalFrame()
168 ? toWebLocalFrameImpl(m_webFrame->top())->devToolsFrontend() 173 ? toWebLocalFrameImpl(m_webFrame->top())->devToolsFrontend()
169 : nullptr; 174 : nullptr;
170 if (devToolsFrontend) 175 if (devToolsFrontend)
171 devToolsFrontend->didClearWindowObject(m_webFrame); 176 devToolsFrontend->didClearWindowObject(m_webFrame);
172 } 177 }
(...skipping 857 matching lines...) Expand 10 before | Expand all | Expand 10 after
1030 if (m_webFrame->client()) 1035 if (m_webFrame->client())
1031 m_webFrame->client()->setHasReceivedUserGesture(); 1036 m_webFrame->client()->setHasReceivedUserGesture();
1032 } 1037 }
1033 1038
1034 void LocalFrameClientImpl::abortClientNavigation() { 1039 void LocalFrameClientImpl::abortClientNavigation() {
1035 if (m_webFrame->client()) 1040 if (m_webFrame->client())
1036 m_webFrame->client()->abortClientNavigation(); 1041 m_webFrame->client()->abortClientNavigation();
1037 } 1042 }
1038 1043
1039 } // namespace blink 1044 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/modules/presentation/PresentationReceiver.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698