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

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

Issue 1245363002: Add WebUSB bindings and client interface (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: cleanup, better error reporting Created 5 years, 4 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 Google Inc. All rights reserved. 2 * Copyright (C) 2009 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 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 #include "core/timing/Performance.h" 155 #include "core/timing/Performance.h"
156 #include "modules/app_banner/AppBannerController.h" 156 #include "modules/app_banner/AppBannerController.h"
157 #include "modules/bluetooth/BluetoothSupplement.h" 157 #include "modules/bluetooth/BluetoothSupplement.h"
158 #include "modules/geolocation/GeolocationController.h" 158 #include "modules/geolocation/GeolocationController.h"
159 #include "modules/notifications/NotificationPermissionClient.h" 159 #include "modules/notifications/NotificationPermissionClient.h"
160 #include "modules/permissions/PermissionController.h" 160 #include "modules/permissions/PermissionController.h"
161 #include "modules/presentation/PresentationController.h" 161 #include "modules/presentation/PresentationController.h"
162 #include "modules/push_messaging/PushController.h" 162 #include "modules/push_messaging/PushController.h"
163 #include "modules/screen_orientation/ScreenOrientationController.h" 163 #include "modules/screen_orientation/ScreenOrientationController.h"
164 #include "modules/vr/VRController.h" 164 #include "modules/vr/VRController.h"
165 #include "modules/webusb/USBController.h"
165 #include "platform/ScriptForbiddenScope.h" 166 #include "platform/ScriptForbiddenScope.h"
166 #include "platform/TraceEvent.h" 167 #include "platform/TraceEvent.h"
167 #include "platform/UserGestureIndicator.h" 168 #include "platform/UserGestureIndicator.h"
168 #include "platform/clipboard/ClipboardUtilities.h" 169 #include "platform/clipboard/ClipboardUtilities.h"
169 #include "platform/fonts/FontCache.h" 170 #include "platform/fonts/FontCache.h"
170 #include "platform/graphics/GraphicsContext.h" 171 #include "platform/graphics/GraphicsContext.h"
171 #include "platform/graphics/GraphicsLayerClient.h" 172 #include "platform/graphics/GraphicsLayerClient.h"
172 #include "platform/graphics/paint/ClipRecorder.h" 173 #include "platform/graphics/paint/ClipRecorder.h"
173 #include "platform/graphics/paint/DrawingRecorder.h" 174 #include "platform/graphics/paint/DrawingRecorder.h"
174 #include "platform/graphics/paint/SkPictureBuilder.h" 175 #include "platform/graphics/paint/SkPictureBuilder.h"
(...skipping 1536 matching lines...) Expand 10 before | Expand all | Expand 10 after
1711 provideNavigatorContentUtilsTo(*m_frame, NavigatorContentUtilsClientImpl ::create(this)); 1712 provideNavigatorContentUtilsTo(*m_frame, NavigatorContentUtilsClientImpl ::create(this));
1712 1713
1713 if (RuntimeEnabledFeatures::webBluetoothEnabled()) 1714 if (RuntimeEnabledFeatures::webBluetoothEnabled())
1714 BluetoothSupplement::provideTo(*m_frame, m_client ? m_client->blueto oth() : nullptr); 1715 BluetoothSupplement::provideTo(*m_frame, m_client ? m_client->blueto oth() : nullptr);
1715 if (RuntimeEnabledFeatures::screenOrientationEnabled()) 1716 if (RuntimeEnabledFeatures::screenOrientationEnabled())
1716 ScreenOrientationController::provideTo(*m_frame, m_client ? m_client ->webScreenOrientationClient() : nullptr); 1717 ScreenOrientationController::provideTo(*m_frame, m_client ? m_client ->webScreenOrientationClient() : nullptr);
1717 if (RuntimeEnabledFeatures::presentationEnabled()) 1718 if (RuntimeEnabledFeatures::presentationEnabled())
1718 PresentationController::provideTo(*m_frame, m_client ? m_client->pre sentationClient() : nullptr); 1719 PresentationController::provideTo(*m_frame, m_client ? m_client->pre sentationClient() : nullptr);
1719 if (RuntimeEnabledFeatures::permissionsEnabled()) 1720 if (RuntimeEnabledFeatures::permissionsEnabled())
1720 PermissionController::provideTo(*m_frame, m_client ? m_client->permi ssionClient() : nullptr); 1721 PermissionController::provideTo(*m_frame, m_client ? m_client->permi ssionClient() : nullptr);
1722 if (RuntimeEnabledFeatures::webUSBEnabled())
1723 USBController::provideTo(*m_frame, m_client ? m_client->usbClient() : nullptr);
1721 if (RuntimeEnabledFeatures::webVREnabled()) 1724 if (RuntimeEnabledFeatures::webVREnabled())
1722 VRController::provideTo(*m_frame, m_client ? m_client->webVRClient() : nullptr); 1725 VRController::provideTo(*m_frame, m_client ? m_client->webVRClient() : nullptr);
1723 } 1726 }
1724 } 1727 }
1725 1728
1726 PassRefPtrWillBeRawPtr<LocalFrame> WebLocalFrameImpl::initializeCoreFrame(FrameH ost* host, FrameOwner* owner, const AtomicString& name, const AtomicString& fall backName) 1729 PassRefPtrWillBeRawPtr<LocalFrame> WebLocalFrameImpl::initializeCoreFrame(FrameH ost* host, FrameOwner* owner, const AtomicString& name, const AtomicString& fall backName)
1727 { 1730 {
1728 RefPtrWillBeRawPtr<LocalFrame> frame = LocalFrame::create(&m_frameLoaderClie ntImpl, host, owner); 1731 RefPtrWillBeRawPtr<LocalFrame> frame = LocalFrame::create(&m_frameLoaderClie ntImpl, host, owner);
1729 setCoreFrame(frame); 1732 setCoreFrame(frame);
1730 frame->tree().setName(name, fallbackName); 1733 frame->tree().setName(name, fallbackName);
(...skipping 460 matching lines...) Expand 10 before | Expand all | Expand 10 after
2191 } 2194 }
2192 2195
2193 WebSandboxFlags WebLocalFrameImpl::effectiveSandboxFlags() const 2196 WebSandboxFlags WebLocalFrameImpl::effectiveSandboxFlags() const
2194 { 2197 {
2195 if (!frame()) 2198 if (!frame())
2196 return WebSandboxFlags::None; 2199 return WebSandboxFlags::None;
2197 return static_cast<WebSandboxFlags>(frame()->loader().effectiveSandboxFlags( )); 2200 return static_cast<WebSandboxFlags>(frame()->loader().effectiveSandboxFlags( ));
2198 } 2201 }
2199 2202
2200 } // namespace blink 2203 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698