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

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

Issue 2786673002: Separate ContentSettingsClient out from LocalFrameClient (Closed)
Patch Set: fix 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 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 #include "core/dom/shadow/ShadowRoot.h" 111 #include "core/dom/shadow/ShadowRoot.h"
112 #include "core/editing/EditingUtilities.h" 112 #include "core/editing/EditingUtilities.h"
113 #include "core/editing/Editor.h" 113 #include "core/editing/Editor.h"
114 #include "core/editing/FrameSelection.h" 114 #include "core/editing/FrameSelection.h"
115 #include "core/editing/InputMethodController.h" 115 #include "core/editing/InputMethodController.h"
116 #include "core/editing/PlainTextRange.h" 116 #include "core/editing/PlainTextRange.h"
117 #include "core/editing/TextAffinity.h" 117 #include "core/editing/TextAffinity.h"
118 #include "core/editing/iterators/TextIterator.h" 118 #include "core/editing/iterators/TextIterator.h"
119 #include "core/editing/serializers/Serialization.h" 119 #include "core/editing/serializers/Serialization.h"
120 #include "core/editing/spellcheck/SpellChecker.h" 120 #include "core/editing/spellcheck/SpellChecker.h"
121 #include "core/frame/ContentSettingsClient.h"
121 #include "core/frame/FrameView.h" 122 #include "core/frame/FrameView.h"
122 #include "core/frame/LocalDOMWindow.h" 123 #include "core/frame/LocalDOMWindow.h"
123 #include "core/frame/PageScaleConstraintsSet.h" 124 #include "core/frame/PageScaleConstraintsSet.h"
124 #include "core/frame/RemoteFrame.h" 125 #include "core/frame/RemoteFrame.h"
125 #include "core/frame/ScreenOrientationController.h" 126 #include "core/frame/ScreenOrientationController.h"
126 #include "core/frame/Settings.h" 127 #include "core/frame/Settings.h"
127 #include "core/frame/SmartClip.h" 128 #include "core/frame/SmartClip.h"
128 #include "core/frame/UseCounter.h" 129 #include "core/frame/UseCounter.h"
129 #include "core/frame/VisualViewport.h" 130 #include "core/frame/VisualViewport.h"
130 #include "core/html/HTMLAnchorElement.h" 131 #include "core/html/HTMLAnchorElement.h"
(...skipping 436 matching lines...) Expand 10 before | Expand all | Expand 10 after
567 568
568 WebVector<WebIconURL> WebLocalFrameImpl::iconURLs(int iconTypesMask) const { 569 WebVector<WebIconURL> WebLocalFrameImpl::iconURLs(int iconTypesMask) const {
569 // The URL to the icon may be in the header. As such, only 570 // The URL to the icon may be in the header. As such, only
570 // ask the loader for the icon if it's finished loading. 571 // ask the loader for the icon if it's finished loading.
571 if (frame()->document()->loadEventFinished()) 572 if (frame()->document()->loadEventFinished())
572 return frame()->document()->iconURLs(iconTypesMask); 573 return frame()->document()->iconURLs(iconTypesMask);
573 return WebVector<WebIconURL>(); 574 return WebVector<WebIconURL>();
574 } 575 }
575 576
576 void WebLocalFrameImpl::setContentSettingsClient( 577 void WebLocalFrameImpl::setContentSettingsClient(
577 WebContentSettingsClient* contentSettingsClient) { 578 WebContentSettingsClient* client) {
578 m_contentSettingsClient = contentSettingsClient; 579 m_contentSettingsClient->setClient(client);
579 } 580 }
580 581
581 void WebLocalFrameImpl::setSharedWorkerRepositoryClient( 582 void WebLocalFrameImpl::setSharedWorkerRepositoryClient(
582 WebSharedWorkerRepositoryClient* client) { 583 WebSharedWorkerRepositoryClient* client) {
583 m_sharedWorkerRepositoryClient = 584 m_sharedWorkerRepositoryClient =
584 SharedWorkerRepositoryClientImpl::create(client); 585 SharedWorkerRepositoryClientImpl::create(client);
585 } 586 }
586 587
587 ScrollableArea* WebLocalFrameImpl::layoutViewportScrollableArea() const { 588 ScrollableArea* WebLocalFrameImpl::layoutViewportScrollableArea() const {
588 if (FrameView* view = frameView()) 589 if (FrameView* view = frameView())
(...skipping 971 matching lines...) Expand 10 before | Expand all | Expand 10 after
1560 WebLocalFrameImpl::WebLocalFrameImpl( 1561 WebLocalFrameImpl::WebLocalFrameImpl(
1561 WebTreeScopeType scope, 1562 WebTreeScopeType scope,
1562 WebFrameClient* client, 1563 WebFrameClient* client,
1563 blink::InterfaceProvider* interfaceProvider, 1564 blink::InterfaceProvider* interfaceProvider,
1564 blink::InterfaceRegistry* interfaceRegistry) 1565 blink::InterfaceRegistry* interfaceRegistry)
1565 : WebLocalFrame(scope), 1566 : WebLocalFrame(scope),
1566 m_localFrameClientImpl(LocalFrameClientImpl::create(this)), 1567 m_localFrameClientImpl(LocalFrameClientImpl::create(this)),
1567 m_frameWidget(0), 1568 m_frameWidget(0),
1568 m_client(client), 1569 m_client(client),
1569 m_autofillClient(0), 1570 m_autofillClient(0),
1570 m_contentSettingsClient(0), 1571 m_contentSettingsClient(new ContentSettingsClient()),
1571 m_inputEventsScaleFactorForEmulation(1), 1572 m_inputEventsScaleFactorForEmulation(1),
1572 m_interfaceProvider(interfaceProvider), 1573 m_interfaceProvider(interfaceProvider),
1573 m_interfaceRegistry(interfaceRegistry), 1574 m_interfaceRegistry(interfaceRegistry),
1574 m_webDevToolsFrontend(0), 1575 m_webDevToolsFrontend(0),
1575 m_inputMethodController(new WebInputMethodControllerImpl(this)), 1576 m_inputMethodController(new WebInputMethodControllerImpl(this)),
1576 m_selfKeepAlive(this) { 1577 m_selfKeepAlive(this) {
1577 DCHECK(m_client); 1578 DCHECK(m_client);
1578 frameCount++; 1579 frameCount++;
1579 } 1580 }
1580 1581
(...skipping 15 matching lines...) Expand all
1596 frameCount--; 1597 frameCount--;
1597 } 1598 }
1598 1599
1599 DEFINE_TRACE(WebLocalFrameImpl) { 1600 DEFINE_TRACE(WebLocalFrameImpl) {
1600 visitor->trace(m_localFrameClientImpl); 1601 visitor->trace(m_localFrameClientImpl);
1601 visitor->trace(m_frame); 1602 visitor->trace(m_frame);
1602 visitor->trace(m_devToolsAgent); 1603 visitor->trace(m_devToolsAgent);
1603 visitor->trace(m_textFinder); 1604 visitor->trace(m_textFinder);
1604 visitor->trace(m_printContext); 1605 visitor->trace(m_printContext);
1605 visitor->trace(m_contextMenuNode); 1606 visitor->trace(m_contextMenuNode);
1607 visitor->trace(m_contentSettingsClient);
1606 WebFrame::traceFrames(visitor, this); 1608 WebFrame::traceFrames(visitor, this);
1607 WebFrameImplBase::trace(visitor); 1609 WebFrameImplBase::trace(visitor);
1608 } 1610 }
1609 1611
1610 void WebLocalFrameImpl::setCoreFrame(LocalFrame* frame) { 1612 void WebLocalFrameImpl::setCoreFrame(LocalFrame* frame) {
1611 m_frame = frame; 1613 m_frame = frame;
1612 } 1614 }
1613 1615
1614 void WebLocalFrameImpl::initializeCoreFrame(Page& page, 1616 void WebLocalFrameImpl::initializeCoreFrame(Page& page,
1615 FrameOwner* owner, 1617 FrameOwner* owner,
(...skipping 899 matching lines...) Expand 10 before | Expand all | Expand 10 after
2515 createMarkup(startPosition, endPosition, AnnotateForInterchange, 2517 createMarkup(startPosition, endPosition, AnnotateForInterchange,
2516 ConvertBlocksToInlines::NotConvert, ResolveNonLocalURLs); 2518 ConvertBlocksToInlines::NotConvert, ResolveNonLocalURLs);
2517 } else { 2519 } else {
2518 clipHtml = 2520 clipHtml =
2519 createMarkup(endPosition, startPosition, AnnotateForInterchange, 2521 createMarkup(endPosition, startPosition, AnnotateForInterchange,
2520 ConvertBlocksToInlines::NotConvert, ResolveNonLocalURLs); 2522 ConvertBlocksToInlines::NotConvert, ResolveNonLocalURLs);
2521 } 2523 }
2522 } 2524 }
2523 2525
2524 } // namespace blink 2526 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698