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

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

Issue 2783543004: Move registration of LocalFrame mojo interfaces to ModulesInitializer. (Closed)
Patch Set: Address code review feedback. Created 3 years, 8 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 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 #include "core/loader/NavigationScheduler.h" 151 #include "core/loader/NavigationScheduler.h"
152 #include "core/page/FocusController.h" 152 #include "core/page/FocusController.h"
153 #include "core/page/FrameTree.h" 153 #include "core/page/FrameTree.h"
154 #include "core/page/Page.h" 154 #include "core/page/Page.h"
155 #include "core/page/PrintContext.h" 155 #include "core/page/PrintContext.h"
156 #include "core/paint/PaintLayer.h" 156 #include "core/paint/PaintLayer.h"
157 #include "core/paint/TransformRecorder.h" 157 #include "core/paint/TransformRecorder.h"
158 #include "core/style/StyleInheritedData.h" 158 #include "core/style/StyleInheritedData.h"
159 #include "core/timing/DOMWindowPerformance.h" 159 #include "core/timing/DOMWindowPerformance.h"
160 #include "core/timing/Performance.h" 160 #include "core/timing/Performance.h"
161 #include "modules/app_banner/AppBannerController.h"
162 #include "modules/installation/InstallationServiceImpl.h"
163 #include "platform/ScriptForbiddenScope.h" 161 #include "platform/ScriptForbiddenScope.h"
164 #include "platform/UserGestureIndicator.h" 162 #include "platform/UserGestureIndicator.h"
165 #include "platform/WebFrameScheduler.h" 163 #include "platform/WebFrameScheduler.h"
166 #include "platform/clipboard/ClipboardUtilities.h" 164 #include "platform/clipboard/ClipboardUtilities.h"
167 #include "platform/fonts/FontCache.h" 165 #include "platform/fonts/FontCache.h"
168 #include "platform/graphics/GraphicsContext.h" 166 #include "platform/graphics/GraphicsContext.h"
169 #include "platform/graphics/GraphicsLayerClient.h" 167 #include "platform/graphics/GraphicsLayerClient.h"
170 #include "platform/graphics/paint/ClipRecorder.h" 168 #include "platform/graphics/paint/ClipRecorder.h"
171 #include "platform/graphics/paint/DisplayItemCacheSkipper.h" 169 #include "platform/graphics/paint/DisplayItemCacheSkipper.h"
172 #include "platform/graphics/paint/DrawingRecorder.h" 170 #include "platform/graphics/paint/DrawingRecorder.h"
173 #include "platform/graphics/paint/PaintRecordBuilder.h" 171 #include "platform/graphics/paint/PaintRecordBuilder.h"
174 #include "platform/graphics/skia/SkiaUtils.h" 172 #include "platform/graphics/skia/SkiaUtils.h"
175 #include "platform/heap/Handle.h" 173 #include "platform/heap/Handle.h"
176 #include "platform/instrumentation/tracing/TraceEvent.h" 174 #include "platform/instrumentation/tracing/TraceEvent.h"
177 #include "platform/loader/fetch/ResourceFetcher.h" 175 #include "platform/loader/fetch/ResourceFetcher.h"
178 #include "platform/loader/fetch/ResourceRequest.h" 176 #include "platform/loader/fetch/ResourceRequest.h"
179 #include "platform/loader/fetch/SubstituteData.h" 177 #include "platform/loader/fetch/SubstituteData.h"
180 #include "platform/scroll/ScrollTypes.h" 178 #include "platform/scroll/ScrollTypes.h"
181 #include "platform/scroll/ScrollbarTheme.h" 179 #include "platform/scroll/ScrollbarTheme.h"
182 #include "platform/weborigin/KURL.h" 180 #include "platform/weborigin/KURL.h"
183 #include "platform/weborigin/SchemeRegistry.h" 181 #include "platform/weborigin/SchemeRegistry.h"
184 #include "platform/weborigin/SecurityPolicy.h" 182 #include "platform/weborigin/SecurityPolicy.h"
185 #include "public/platform/InterfaceProvider.h"
186 #include "public/platform/InterfaceRegistry.h"
187 #include "public/platform/WebDoubleSize.h" 183 #include "public/platform/WebDoubleSize.h"
188 #include "public/platform/WebFloatPoint.h" 184 #include "public/platform/WebFloatPoint.h"
189 #include "public/platform/WebFloatRect.h" 185 #include "public/platform/WebFloatRect.h"
190 #include "public/platform/WebLayer.h" 186 #include "public/platform/WebLayer.h"
191 #include "public/platform/WebPoint.h" 187 #include "public/platform/WebPoint.h"
192 #include "public/platform/WebRect.h" 188 #include "public/platform/WebRect.h"
193 #include "public/platform/WebSecurityOrigin.h" 189 #include "public/platform/WebSecurityOrigin.h"
194 #include "public/platform/WebSize.h" 190 #include "public/platform/WebSize.h"
195 #include "public/platform/WebURLError.h" 191 #include "public/platform/WebURLError.h"
196 #include "public/platform/WebVector.h" 192 #include "public/platform/WebVector.h"
(...skipping 1411 matching lines...) Expand 10 before | Expand all | Expand 10 after
1608 // during init(). Note that this may dispatch JS events; the frame may be 1604 // during init(). Note that this may dispatch JS events; the frame may be
1609 // detached after init() returns. 1605 // detached after init() returns.
1610 frame()->init(); 1606 frame()->init();
1611 if (frame()) { 1607 if (frame()) {
1612 if (frame()->loader().stateMachine()->isDisplayingInitialEmptyDocument() && 1608 if (frame()->loader().stateMachine()->isDisplayingInitialEmptyDocument() &&
1613 !parent() && !opener() && 1609 !parent() && !opener() &&
1614 frame()->settings()->getShouldReuseGlobalForUnownedMainFrame()) { 1610 frame()->settings()->getShouldReuseGlobalForUnownedMainFrame()) {
1615 frame()->document()->getSecurityOrigin()->grantUniversalAccess(); 1611 frame()->document()->getSecurityOrigin()->grantUniversalAccess();
1616 } 1612 }
1617 1613
1618 // TODO(dominickn): This interface should be document-scoped rather than
1619 // frame-scoped, as the resulting banner event is dispatched to
1620 // frame()->document().
1621 frame()->interfaceRegistry()->addInterface(WTF::bind(
1622 &AppBannerController::bindMojoRequest, wrapWeakPersistent(frame())));
1623
1624 frame()->interfaceRegistry()->addInterface(WTF::bind(
1625 &InstallationServiceImpl::create, wrapWeakPersistent(frame())));
1626 if (!owner) { 1614 if (!owner) {
1627 // This trace event is needed to detect the main frame of the 1615 // This trace event is needed to detect the main frame of the
1628 // renderer in telemetry metrics. See crbug.com/692112#c11. 1616 // renderer in telemetry metrics. See crbug.com/692112#c11.
1629 TRACE_EVENT_INSTANT1("loading", "markAsMainFrame", 1617 TRACE_EVENT_INSTANT1("loading", "markAsMainFrame",
1630 TRACE_EVENT_SCOPE_THREAD, "frame", frame()); 1618 TRACE_EVENT_SCOPE_THREAD, "frame", frame());
1631 } 1619 }
1632 } 1620 }
1633 } 1621 }
1634 1622
1635 LocalFrame* WebLocalFrameImpl::createChildFrame( 1623 LocalFrame* WebLocalFrameImpl::createChildFrame(
(...skipping 867 matching lines...) Expand 10 before | Expand all | Expand 10 after
2503 createMarkup(startPosition, endPosition, AnnotateForInterchange, 2491 createMarkup(startPosition, endPosition, AnnotateForInterchange,
2504 ConvertBlocksToInlines::NotConvert, ResolveNonLocalURLs); 2492 ConvertBlocksToInlines::NotConvert, ResolveNonLocalURLs);
2505 } else { 2493 } else {
2506 clipHtml = 2494 clipHtml =
2507 createMarkup(endPosition, startPosition, AnnotateForInterchange, 2495 createMarkup(endPosition, startPosition, AnnotateForInterchange,
2508 ConvertBlocksToInlines::NotConvert, ResolveNonLocalURLs); 2496 ConvertBlocksToInlines::NotConvert, ResolveNonLocalURLs);
2509 } 2497 }
2510 } 2498 }
2511 2499
2512 } // namespace blink 2500 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698