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 1406 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1417 } | 1417 } |
1418 | 1418 |
1419 WebLocalFrameImpl::WebLocalFrameImpl(WebTreeScopeType scope, WebFrameClient* cli ent) | 1419 WebLocalFrameImpl::WebLocalFrameImpl(WebTreeScopeType scope, WebFrameClient* cli ent) |
1420 : WebLocalFrame(scope) | 1420 : WebLocalFrame(scope) |
1421 , m_frameLoaderClientImpl(FrameLoaderClientImpl::create(this)) | 1421 , m_frameLoaderClientImpl(FrameLoaderClientImpl::create(this)) |
1422 , m_frameWidget(0) | 1422 , m_frameWidget(0) |
1423 , m_client(client) | 1423 , m_client(client) |
1424 , m_autofillClient(0) | 1424 , m_autofillClient(0) |
1425 , m_contentSettingsClient(0) | 1425 , m_contentSettingsClient(0) |
1426 , m_inputEventsScaleFactorForEmulation(1) | 1426 , m_inputEventsScaleFactorForEmulation(1) |
1427 , m_userMediaClientImpl(this) | |
1428 , m_webDevToolsFrontend(0) | 1427 , m_webDevToolsFrontend(0) |
1429 , m_selfKeepAlive(this) | 1428 , m_selfKeepAlive(this) |
1430 { | 1429 { |
1431 frameCount++; | 1430 frameCount++; |
1432 } | 1431 } |
1433 | 1432 |
1434 WebLocalFrameImpl::WebLocalFrameImpl(WebRemoteFrame* oldWebFrame, WebFrameClient * client) | 1433 WebLocalFrameImpl::WebLocalFrameImpl(WebRemoteFrame* oldWebFrame, WebFrameClient * client) |
1435 : WebLocalFrameImpl(oldWebFrame->inShadowTree() ? WebTreeScopeType::Shadow : WebTreeScopeType::Document, client) | 1434 : WebLocalFrameImpl(oldWebFrame->inShadowTree() ? WebTreeScopeType::Shadow : WebTreeScopeType::Document, client) |
1436 { | 1435 { |
1437 } | 1436 } |
(...skipping 23 matching lines...) Expand all Loading... | |
1461 m_frame = frame; | 1460 m_frame = frame; |
1462 | 1461 |
1463 // FIXME: we shouldn't add overhead to every frame by registering these obje cts when they're not used. | 1462 // FIXME: we shouldn't add overhead to every frame by registering these obje cts when they're not used. |
1464 if (!m_frame) | 1463 if (!m_frame) |
1465 return; | 1464 return; |
1466 | 1465 |
1467 if (m_client) | 1466 if (m_client) |
1468 providePushControllerTo(*m_frame, m_client->pushClient()); | 1467 providePushControllerTo(*m_frame, m_client->pushClient()); |
1469 | 1468 |
1470 provideNotificationPermissionClientTo(*m_frame, NotificationPermissionClient Impl::create()); | 1469 provideNotificationPermissionClientTo(*m_frame, NotificationPermissionClient Impl::create()); |
1471 provideUserMediaTo(*m_frame, &m_userMediaClientImpl); | 1470 provideUserMediaTo(*m_frame, UserMediaClientImpl::create(m_client->userMedia Client())); |
dcheng
2016/08/17 02:32:47
Can m_client be null here? It's hard to tell.
(Pe
haraken
2016/08/17 02:41:27
Yeah, as far as I look at line 1466 and line 1480
| |
1472 provideIndexedDBClientTo(*m_frame, IndexedDBClientImpl::create()); | 1471 provideIndexedDBClientTo(*m_frame, IndexedDBClientImpl::create()); |
1473 provideLocalFileSystemTo(*m_frame, LocalFileSystemClient::create()); | 1472 provideLocalFileSystemTo(*m_frame, LocalFileSystemClient::create()); |
1474 provideNavigatorContentUtilsTo(*m_frame, NavigatorContentUtilsClientImpl::cr eate(this)); | 1473 provideNavigatorContentUtilsTo(*m_frame, NavigatorContentUtilsClientImpl::cr eate(this)); |
1475 | 1474 |
1476 bool enableWebBluetooth = RuntimeEnabledFeatures::webBluetoothEnabled(); | 1475 bool enableWebBluetooth = RuntimeEnabledFeatures::webBluetoothEnabled(); |
1477 #if OS(CHROMEOS) || OS(ANDROID) || OS(MACOSX) | 1476 #if OS(CHROMEOS) || OS(ANDROID) || OS(MACOSX) |
1478 enableWebBluetooth = true; | 1477 enableWebBluetooth = true; |
1479 #endif | 1478 #endif |
1480 if (enableWebBluetooth) | 1479 if (enableWebBluetooth) |
1481 BluetoothSupplement::provideTo(*m_frame, m_client ? m_client->bluetooth( ) : nullptr); | 1480 BluetoothSupplement::provideTo(*m_frame, m_client ? m_client->bluetooth( ) : nullptr); |
(...skipping 666 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2148 { | 2147 { |
2149 frame()->loader().forceSandboxFlags(static_cast<SandboxFlags>(flags)); | 2148 frame()->loader().forceSandboxFlags(static_cast<SandboxFlags>(flags)); |
2150 } | 2149 } |
2151 | 2150 |
2152 void WebLocalFrameImpl::clearActiveFindMatch() | 2151 void WebLocalFrameImpl::clearActiveFindMatch() |
2153 { | 2152 { |
2154 ensureTextFinder().clearActiveFindMatch(); | 2153 ensureTextFinder().clearActiveFindMatch(); |
2155 } | 2154 } |
2156 | 2155 |
2157 } // namespace blink | 2156 } // namespace blink |
OLD | NEW |