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

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

Issue 1810853002: Blink Platform: Erase GraphicsLayerFactory. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 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 * 1. Redistributions of source code must retain the above copyright 8 * 1. 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 * 10 *
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 return; 71 return;
72 72
73 Page* page = m_viewImpl->page(); 73 Page* page = m_viewImpl->page();
74 if (!page) 74 if (!page)
75 return; 75 return;
76 76
77 if (!page->mainFrame()->isLocalFrame()) 77 if (!page->mainFrame()->isLocalFrame())
78 return; 78 return;
79 79
80 if (!m_layer) { 80 if (!m_layer) {
81 m_layer = GraphicsLayer::create(m_viewImpl->graphicsLayerFactory(), this ); 81 m_layer = GraphicsLayer::create(this);
82 m_layer->setDrawsContent(true); 82 m_layer->setDrawsContent(true);
83 83
84 if (WebDevToolsAgentImpl* devTools = m_viewImpl->mainFrameDevToolsAgentI mpl()) 84 if (WebDevToolsAgentImpl* devTools = m_viewImpl->mainFrameDevToolsAgentI mpl())
85 devTools->willAddPageOverlay(m_layer.get()); 85 devTools->willAddPageOverlay(m_layer.get());
86 86
87 // This is required for contents of overlay to stay in sync with the pag e while scrolling. 87 // This is required for contents of overlay to stay in sync with the pag e while scrolling.
88 WebLayer* platformLayer = m_layer->platformLayer(); 88 WebLayer* platformLayer = m_layer->platformLayer();
89 platformLayer->addMainThreadScrollingReasons(MainThreadScrollingReason:: kPageOverlay); 89 platformLayer->addMainThreadScrollingReasons(MainThreadScrollingReason:: kPageOverlay);
90 page->frameHost().visualViewport().containerLayer()->addChild(m_layer.ge t()); 90 page->frameHost().visualViewport().containerLayer()->addChild(m_layer.ge t());
91 } 91 }
(...skipping 15 matching lines...) Expand all
107 ASSERT(m_layer); 107 ASSERT(m_layer);
108 m_delegate->paintPageOverlay(*this, gc, interestRect.size()); 108 m_delegate->paintPageOverlay(*this, gc, interestRect.size());
109 } 109 }
110 110
111 String PageOverlay::debugName(const GraphicsLayer*) const 111 String PageOverlay::debugName(const GraphicsLayer*) const
112 { 112 {
113 return "WebViewImpl Page Overlay Content Layer"; 113 return "WebViewImpl Page Overlay Content Layer";
114 } 114 }
115 115
116 } // namespace blink 116 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/GraphicsLayerFactoryChromium.cpp ('k') | third_party/WebKit/Source/web/WebPagePopupImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698