| OLD | NEW |
| 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 1432 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1443 } | 1443 } |
| 1444 | 1444 |
| 1445 WebLocalFrameImpl::WebLocalFrameImpl(WebTreeScopeType scope, WebFrameClient* cli
ent) | 1445 WebLocalFrameImpl::WebLocalFrameImpl(WebTreeScopeType scope, WebFrameClient* cli
ent) |
| 1446 : WebLocalFrame(scope) | 1446 : WebLocalFrame(scope) |
| 1447 , m_frameLoaderClientImpl(FrameLoaderClientImpl::create(this)) | 1447 , m_frameLoaderClientImpl(FrameLoaderClientImpl::create(this)) |
| 1448 , m_frameWidget(0) | 1448 , m_frameWidget(0) |
| 1449 , m_client(client) | 1449 , m_client(client) |
| 1450 , m_autofillClient(0) | 1450 , m_autofillClient(0) |
| 1451 , m_contentSettingsClient(0) | 1451 , m_contentSettingsClient(0) |
| 1452 , m_inputEventsScaleFactorForEmulation(1) | 1452 , m_inputEventsScaleFactorForEmulation(1) |
| 1453 , m_userMediaClientImpl(this) | |
| 1454 , m_webDevToolsFrontend(0) | 1453 , m_webDevToolsFrontend(0) |
| 1455 , m_selfKeepAlive(this) | 1454 , m_selfKeepAlive(this) |
| 1456 { | 1455 { |
| 1457 frameCount++; | 1456 frameCount++; |
| 1458 } | 1457 } |
| 1459 | 1458 |
| 1460 WebLocalFrameImpl::WebLocalFrameImpl(WebRemoteFrame* oldWebFrame, WebFrameClient
* client) | 1459 WebLocalFrameImpl::WebLocalFrameImpl(WebRemoteFrame* oldWebFrame, WebFrameClient
* client) |
| 1461 : WebLocalFrameImpl(oldWebFrame->inShadowTree() ? WebTreeScopeType::Shadow :
WebTreeScopeType::Document, client) | 1460 : WebLocalFrameImpl(oldWebFrame->inShadowTree() ? WebTreeScopeType::Shadow :
WebTreeScopeType::Document, client) |
| 1462 { | 1461 { |
| 1463 } | 1462 } |
| (...skipping 19 matching lines...) Expand all Loading... |
| 1483 } | 1482 } |
| 1484 | 1483 |
| 1485 void WebLocalFrameImpl::setCoreFrame(LocalFrame* frame) | 1484 void WebLocalFrameImpl::setCoreFrame(LocalFrame* frame) |
| 1486 { | 1485 { |
| 1487 m_frame = frame; | 1486 m_frame = frame; |
| 1488 | 1487 |
| 1489 // FIXME: we shouldn't add overhead to every frame by registering these obje
cts when they're not used. | 1488 // FIXME: we shouldn't add overhead to every frame by registering these obje
cts when they're not used. |
| 1490 if (!m_frame) | 1489 if (!m_frame) |
| 1491 return; | 1490 return; |
| 1492 | 1491 |
| 1493 if (m_client) | 1492 if (m_client) { |
| 1494 providePushControllerTo(*m_frame, m_client->pushClient()); | 1493 providePushControllerTo(*m_frame, m_client->pushClient()); |
| 1494 provideUserMediaTo(*m_frame, UserMediaClientImpl::create(m_client->userM
ediaClient())); |
| 1495 } |
| 1495 | 1496 |
| 1496 provideNotificationPermissionClientTo(*m_frame, NotificationPermissionClient
Impl::create()); | 1497 provideNotificationPermissionClientTo(*m_frame, NotificationPermissionClient
Impl::create()); |
| 1497 provideUserMediaTo(*m_frame, &m_userMediaClientImpl); | |
| 1498 provideIndexedDBClientTo(*m_frame, IndexedDBClientImpl::create()); | 1498 provideIndexedDBClientTo(*m_frame, IndexedDBClientImpl::create()); |
| 1499 provideLocalFileSystemTo(*m_frame, LocalFileSystemClient::create()); | 1499 provideLocalFileSystemTo(*m_frame, LocalFileSystemClient::create()); |
| 1500 provideNavigatorContentUtilsTo(*m_frame, NavigatorContentUtilsClientImpl::cr
eate(this)); | 1500 provideNavigatorContentUtilsTo(*m_frame, NavigatorContentUtilsClientImpl::cr
eate(this)); |
| 1501 | 1501 |
| 1502 bool enableWebBluetooth = RuntimeEnabledFeatures::webBluetoothEnabled(); | 1502 bool enableWebBluetooth = RuntimeEnabledFeatures::webBluetoothEnabled(); |
| 1503 #if OS(CHROMEOS) || OS(ANDROID) || OS(MACOSX) | 1503 #if OS(CHROMEOS) || OS(ANDROID) || OS(MACOSX) |
| 1504 enableWebBluetooth = true; | 1504 enableWebBluetooth = true; |
| 1505 #endif | 1505 #endif |
| 1506 if (enableWebBluetooth) | 1506 if (enableWebBluetooth) |
| 1507 BluetoothSupplement::provideTo(*m_frame, m_client ? m_client->bluetooth(
) : nullptr); | 1507 BluetoothSupplement::provideTo(*m_frame, m_client ? m_client->bluetooth(
) : nullptr); |
| (...skipping 732 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2240 feature = UseCounter::ChromeLoadTimesNpnNegotiatedProtocol; | 2240 feature = UseCounter::ChromeLoadTimesNpnNegotiatedProtocol; |
| 2241 } else if (metric == "wasAlternateProtocolAvailable") { | 2241 } else if (metric == "wasAlternateProtocolAvailable") { |
| 2242 feature = UseCounter::ChromeLoadTimesWasAlternateProtocolAvailable; | 2242 feature = UseCounter::ChromeLoadTimesWasAlternateProtocolAvailable; |
| 2243 } else if (metric == "connectionInfo") { | 2243 } else if (metric == "connectionInfo") { |
| 2244 feature = UseCounter::ChromeLoadTimesConnectionInfo; | 2244 feature = UseCounter::ChromeLoadTimesConnectionInfo; |
| 2245 } | 2245 } |
| 2246 UseCounter::count(frame(), feature); | 2246 UseCounter::count(frame(), feature); |
| 2247 } | 2247 } |
| 2248 | 2248 |
| 2249 } // namespace blink | 2249 } // namespace blink |
| OLD | NEW |