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

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

Issue 1262163003: Add WebUSB bindings and client interface [part 1] (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Handle null navigator.frame() without ASSERT 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
« no previous file with comments | « Source/platform/RuntimeEnabledFeatures.in ('k') | public/platform/modules/webusb/OWNERS » ('j') | 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 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 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
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/wake_lock/ScreenWakeLock.h" 165 #include "modules/wake_lock/ScreenWakeLock.h"
166 #include "modules/webusb/USBController.h"
166 #include "platform/ScriptForbiddenScope.h" 167 #include "platform/ScriptForbiddenScope.h"
167 #include "platform/TraceEvent.h" 168 #include "platform/TraceEvent.h"
168 #include "platform/UserGestureIndicator.h" 169 #include "platform/UserGestureIndicator.h"
169 #include "platform/clipboard/ClipboardUtilities.h" 170 #include "platform/clipboard/ClipboardUtilities.h"
170 #include "platform/fonts/FontCache.h" 171 #include "platform/fonts/FontCache.h"
171 #include "platform/graphics/GraphicsContext.h" 172 #include "platform/graphics/GraphicsContext.h"
172 #include "platform/graphics/GraphicsLayerClient.h" 173 #include "platform/graphics/GraphicsLayerClient.h"
173 #include "platform/graphics/paint/ClipRecorder.h" 174 #include "platform/graphics/paint/ClipRecorder.h"
174 #include "platform/graphics/paint/DrawingRecorder.h" 175 #include "platform/graphics/paint/DrawingRecorder.h"
175 #include "platform/graphics/paint/SkPictureBuilder.h" 176 #include "platform/graphics/paint/SkPictureBuilder.h"
(...skipping 1542 matching lines...) Expand 10 before | Expand all | Expand 10 after
1718 provideNavigatorContentUtilsTo(*m_frame, NavigatorContentUtilsClientImpl ::create(this)); 1719 provideNavigatorContentUtilsTo(*m_frame, NavigatorContentUtilsClientImpl ::create(this));
1719 1720
1720 if (RuntimeEnabledFeatures::webBluetoothEnabled()) 1721 if (RuntimeEnabledFeatures::webBluetoothEnabled())
1721 BluetoothSupplement::provideTo(*m_frame, m_client ? m_client->blueto oth() : nullptr); 1722 BluetoothSupplement::provideTo(*m_frame, m_client ? m_client->blueto oth() : nullptr);
1722 if (RuntimeEnabledFeatures::screenOrientationEnabled()) 1723 if (RuntimeEnabledFeatures::screenOrientationEnabled())
1723 ScreenOrientationController::provideTo(*m_frame, m_client ? m_client ->webScreenOrientationClient() : nullptr); 1724 ScreenOrientationController::provideTo(*m_frame, m_client ? m_client ->webScreenOrientationClient() : nullptr);
1724 if (RuntimeEnabledFeatures::presentationEnabled()) 1725 if (RuntimeEnabledFeatures::presentationEnabled())
1725 PresentationController::provideTo(*m_frame, m_client ? m_client->pre sentationClient() : nullptr); 1726 PresentationController::provideTo(*m_frame, m_client ? m_client->pre sentationClient() : nullptr);
1726 if (RuntimeEnabledFeatures::permissionsEnabled()) 1727 if (RuntimeEnabledFeatures::permissionsEnabled())
1727 PermissionController::provideTo(*m_frame, m_client ? m_client->permi ssionClient() : nullptr); 1728 PermissionController::provideTo(*m_frame, m_client ? m_client->permi ssionClient() : nullptr);
1729 if (RuntimeEnabledFeatures::webUSBEnabled())
1730 USBController::provideTo(*m_frame, m_client ? m_client->usbClient() : nullptr);
1728 if (RuntimeEnabledFeatures::webVREnabled()) 1731 if (RuntimeEnabledFeatures::webVREnabled())
1729 VRController::provideTo(*m_frame, m_client ? m_client->webVRClient() : nullptr); 1732 VRController::provideTo(*m_frame, m_client ? m_client->webVRClient() : nullptr);
1730 if (RuntimeEnabledFeatures::wakeLockEnabled()) 1733 if (RuntimeEnabledFeatures::wakeLockEnabled())
1731 ScreenWakeLock::provideTo(*m_frame, m_client ? m_client->wakeLockCli ent() : nullptr); 1734 ScreenWakeLock::provideTo(*m_frame, m_client ? m_client->wakeLockCli ent() : nullptr);
1732 } 1735 }
1733 } 1736 }
1734 1737
1735 PassRefPtrWillBeRawPtr<LocalFrame> WebLocalFrameImpl::initializeCoreFrame(FrameH ost* host, FrameOwner* owner, const AtomicString& name, const AtomicString& fall backName) 1738 PassRefPtrWillBeRawPtr<LocalFrame> WebLocalFrameImpl::initializeCoreFrame(FrameH ost* host, FrameOwner* owner, const AtomicString& name, const AtomicString& fall backName)
1736 { 1739 {
1737 RefPtrWillBeRawPtr<LocalFrame> frame = LocalFrame::create(&m_frameLoaderClie ntImpl, host, owner); 1740 RefPtrWillBeRawPtr<LocalFrame> frame = LocalFrame::create(&m_frameLoaderClie ntImpl, host, owner);
(...skipping 462 matching lines...) Expand 10 before | Expand all | Expand 10 after
2200 } 2203 }
2201 2204
2202 WebSandboxFlags WebLocalFrameImpl::effectiveSandboxFlags() const 2205 WebSandboxFlags WebLocalFrameImpl::effectiveSandboxFlags() const
2203 { 2206 {
2204 if (!frame()) 2207 if (!frame())
2205 return WebSandboxFlags::None; 2208 return WebSandboxFlags::None;
2206 return static_cast<WebSandboxFlags>(frame()->loader().effectiveSandboxFlags( )); 2209 return static_cast<WebSandboxFlags>(frame()->loader().effectiveSandboxFlags( ));
2207 } 2210 }
2208 2211
2209 } // namespace blink 2212 } // namespace blink
OLDNEW
« no previous file with comments | « Source/platform/RuntimeEnabledFeatures.in ('k') | public/platform/modules/webusb/OWNERS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698