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

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

Issue 2196843003: Blink ServiceRegistry -> InterfaceProvider (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 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 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 #include "platform/graphics/paint/DrawingRecorder.h" 173 #include "platform/graphics/paint/DrawingRecorder.h"
174 #include "platform/graphics/paint/SkPictureBuilder.h" 174 #include "platform/graphics/paint/SkPictureBuilder.h"
175 #include "platform/graphics/skia/SkiaUtils.h" 175 #include "platform/graphics/skia/SkiaUtils.h"
176 #include "platform/heap/Handle.h" 176 #include "platform/heap/Handle.h"
177 #include "platform/network/ResourceRequest.h" 177 #include "platform/network/ResourceRequest.h"
178 #include "platform/scroll/ScrollTypes.h" 178 #include "platform/scroll/ScrollTypes.h"
179 #include "platform/scroll/ScrollbarTheme.h" 179 #include "platform/scroll/ScrollbarTheme.h"
180 #include "platform/weborigin/KURL.h" 180 #include "platform/weborigin/KURL.h"
181 #include "platform/weborigin/SchemeRegistry.h" 181 #include "platform/weborigin/SchemeRegistry.h"
182 #include "platform/weborigin/SecurityPolicy.h" 182 #include "platform/weborigin/SecurityPolicy.h"
183 #include "public/platform/ServiceRegistry.h" 183 #include "public/platform/InterfaceProvider.h"
184 #include "public/platform/WebFloatPoint.h" 184 #include "public/platform/WebFloatPoint.h"
185 #include "public/platform/WebFloatRect.h" 185 #include "public/platform/WebFloatRect.h"
186 #include "public/platform/WebLayer.h" 186 #include "public/platform/WebLayer.h"
187 #include "public/platform/WebPoint.h" 187 #include "public/platform/WebPoint.h"
188 #include "public/platform/WebRect.h" 188 #include "public/platform/WebRect.h"
189 #include "public/platform/WebSecurityOrigin.h" 189 #include "public/platform/WebSecurityOrigin.h"
190 #include "public/platform/WebSize.h" 190 #include "public/platform/WebSize.h"
191 #include "public/platform/WebSuspendableTask.h" 191 #include "public/platform/WebSuspendableTask.h"
192 #include "public/platform/WebURLError.h" 192 #include "public/platform/WebURLError.h"
193 #include "public/platform/WebVector.h" 193 #include "public/platform/WebVector.h"
(...skipping 1197 matching lines...) Expand 10 before | Expand all | Expand 10 after
1391 WebLocalFrameImpl* webFrame = new WebLocalFrameImpl(oldWebFrame, client); 1391 WebLocalFrameImpl* webFrame = new WebLocalFrameImpl(oldWebFrame, client);
1392 Frame* oldFrame = oldWebFrame->toImplBase()->frame(); 1392 Frame* oldFrame = oldWebFrame->toImplBase()->frame();
1393 webFrame->setParent(oldWebFrame->parent()); 1393 webFrame->setParent(oldWebFrame->parent());
1394 webFrame->setOpener(oldWebFrame->opener()); 1394 webFrame->setOpener(oldWebFrame->opener());
1395 // Note: this *always* temporarily sets a frame owner, even for main frames! 1395 // Note: this *always* temporarily sets a frame owner, even for main frames!
1396 // When a core Frame is created with no owner, it attempts to set itself as 1396 // When a core Frame is created with no owner, it attempts to set itself as
1397 // the main frame of the Page. However, this is a provisional frame, and may 1397 // the main frame of the Page. However, this is a provisional frame, and may
1398 // disappear, so Page::m_mainFrame can't be updated just yet. 1398 // disappear, so Page::m_mainFrame can't be updated just yet.
1399 FrameOwner* tempOwner = DummyFrameOwner::create(); 1399 FrameOwner* tempOwner = DummyFrameOwner::create();
1400 // TODO(dcheng): This block is very similar to initializeCoreFrame. Try to r euse it here. 1400 // TODO(dcheng): This block is very similar to initializeCoreFrame. Try to r euse it here.
1401 LocalFrame* frame = LocalFrame::create(webFrame->m_frameLoaderClientImpl.get (), oldFrame->host(), tempOwner, client ? client->serviceRegistry() : nullptr); 1401 LocalFrame* frame = LocalFrame::create(webFrame->m_frameLoaderClientImpl.get (), oldFrame->host(), tempOwner, client ? client->interfaceProvider() : nullptr) ;
1402 // Set the name and unique name directly, bypassing any of the normal logic 1402 // Set the name and unique name directly, bypassing any of the normal logic
1403 // to calculate unique name. 1403 // to calculate unique name.
1404 frame->tree().setPrecalculatedName(toWebRemoteFrameImpl(oldWebFrame)->frame( )->tree().name(), toWebRemoteFrameImpl(oldWebFrame)->frame()->tree().uniqueName( )); 1404 frame->tree().setPrecalculatedName(toWebRemoteFrameImpl(oldWebFrame)->frame( )->tree().name(), toWebRemoteFrameImpl(oldWebFrame)->frame()->tree().uniqueName( ));
1405 webFrame->setCoreFrame(frame); 1405 webFrame->setCoreFrame(frame);
1406 1406
1407 frame->setOwner(oldFrame->owner()); 1407 frame->setOwner(oldFrame->owner());
1408 1408
1409 if (frame->owner() && frame->owner()->isRemote()) 1409 if (frame->owner() && frame->owner()->isRemote())
1410 toRemoteFrameOwner(frame->owner())->setSandboxFlags(static_cast<SandboxF lags>(flags)); 1410 toRemoteFrameOwner(frame->owner())->setSandboxFlags(static_cast<SandboxF lags>(flags));
1411 1411
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
1485 if (RuntimeEnabledFeatures::presentationEnabled()) 1485 if (RuntimeEnabledFeatures::presentationEnabled())
1486 PresentationController::provideTo(*m_frame, m_client ? m_client->present ationClient() : nullptr); 1486 PresentationController::provideTo(*m_frame, m_client ? m_client->present ationClient() : nullptr);
1487 if (RuntimeEnabledFeatures::audioOutputDevicesEnabled()) 1487 if (RuntimeEnabledFeatures::audioOutputDevicesEnabled())
1488 provideAudioOutputDeviceClientTo(*m_frame, AudioOutputDeviceClientImpl:: create()); 1488 provideAudioOutputDeviceClientTo(*m_frame, AudioOutputDeviceClientImpl:: create());
1489 if (RuntimeEnabledFeatures::installedAppEnabled()) 1489 if (RuntimeEnabledFeatures::installedAppEnabled())
1490 InstalledAppController::provideTo(*m_frame, m_client ? m_client->install edAppClient() : nullptr); 1490 InstalledAppController::provideTo(*m_frame, m_client ? m_client->install edAppClient() : nullptr);
1491 } 1491 }
1492 1492
1493 void WebLocalFrameImpl::initializeCoreFrame(FrameHost* host, FrameOwner* owner, const AtomicString& name, const AtomicString& uniqueName) 1493 void WebLocalFrameImpl::initializeCoreFrame(FrameHost* host, FrameOwner* owner, const AtomicString& name, const AtomicString& uniqueName)
1494 { 1494 {
1495 setCoreFrame(LocalFrame::create(m_frameLoaderClientImpl.get(), host, owner, client() ? client()->serviceRegistry() : nullptr)); 1495 setCoreFrame(LocalFrame::create(m_frameLoaderClientImpl.get(), host, owner, client() ? client()->interfaceProvider() : nullptr));
1496 frame()->tree().setPrecalculatedName(name, uniqueName); 1496 frame()->tree().setPrecalculatedName(name, uniqueName);
1497 // We must call init() after m_frame is assigned because it is referenced 1497 // We must call init() after m_frame is assigned because it is referenced
1498 // during init(). Note that this may dispatch JS events; the frame may be 1498 // during init(). Note that this may dispatch JS events; the frame may be
1499 // detached after init() returns. 1499 // detached after init() returns.
1500 frame()->init(); 1500 frame()->init();
1501 if (frame() && frame()->loader().stateMachine()->isDisplayingInitialEmptyDoc ument() && !parent() && !opener() && frame()->settings()->shouldReuseGlobalForUn ownedMainFrame()) 1501 if (frame() && frame()->loader().stateMachine()->isDisplayingInitialEmptyDoc ument() && !parent() && !opener() && frame()->settings()->shouldReuseGlobalForUn ownedMainFrame())
1502 frame()->document()->getSecurityOrigin()->grantUniversalAccess(); 1502 frame()->document()->getSecurityOrigin()->grantUniversalAccess();
1503 } 1503 }
1504 1504
1505 LocalFrame* WebLocalFrameImpl::createChildFrame(const FrameLoadRequest& request, 1505 LocalFrame* WebLocalFrameImpl::createChildFrame(const FrameLoadRequest& request,
(...skipping 643 matching lines...) Expand 10 before | Expand all | Expand 10 after
2149 { 2149 {
2150 frame()->loader().forceSandboxFlags(static_cast<SandboxFlags>(flags)); 2150 frame()->loader().forceSandboxFlags(static_cast<SandboxFlags>(flags));
2151 } 2151 }
2152 2152
2153 void WebLocalFrameImpl::clearActiveFindMatch() 2153 void WebLocalFrameImpl::clearActiveFindMatch()
2154 { 2154 {
2155 ensureTextFinder().clearActiveFindMatch(); 2155 ensureTextFinder().clearActiveFindMatch();
2156 } 2156 }
2157 2157
2158 } // namespace blink 2158 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698