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

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

Issue 1264483002: PageOverlays: Remove PageOverlayList (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase Created 5 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 | Annotate | Revision Log
« no previous file with comments | « Source/web/PageOverlay.h ('k') | Source/web/PageOverlayList.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 18 matching lines...) Expand all
29 #include "config.h" 29 #include "config.h"
30 #include "web/PageOverlay.h" 30 #include "web/PageOverlay.h"
31 31
32 #include "core/frame/FrameHost.h" 32 #include "core/frame/FrameHost.h"
33 #include "core/frame/Settings.h" 33 #include "core/frame/Settings.h"
34 #include "core/page/Page.h" 34 #include "core/page/Page.h"
35 #include "platform/graphics/GraphicsContext.h" 35 #include "platform/graphics/GraphicsContext.h"
36 #include "platform/graphics/GraphicsLayer.h" 36 #include "platform/graphics/GraphicsLayer.h"
37 #include "platform/graphics/GraphicsLayerClient.h" 37 #include "platform/graphics/GraphicsLayerClient.h"
38 #include "public/platform/WebLayer.h" 38 #include "public/platform/WebLayer.h"
39 #include "public/web/WebPageOverlay.h"
40 #include "public/web/WebViewClient.h" 39 #include "public/web/WebViewClient.h"
41 #include "web/WebDevToolsAgentImpl.h" 40 #include "web/WebDevToolsAgentImpl.h"
42 #include "web/WebGraphicsContextImpl.h" 41 #include "web/WebGraphicsContextImpl.h"
43 #include "web/WebViewImpl.h" 42 #include "web/WebViewImpl.h"
44 43
45 namespace blink { 44 namespace blink {
46 45
47 PassOwnPtr<PageOverlay> PageOverlay::create(WebViewImpl* viewImpl, WebPageOverla y* overlay) 46 PassOwnPtr<PageOverlay> PageOverlay::create(WebViewImpl* viewImpl, PassOwnPtr<Pa geOverlay::Delegate> overlay)
48 { 47 {
49 return adoptPtr(new PageOverlay(viewImpl, overlay)); 48 return adoptPtr(new PageOverlay(viewImpl, overlay));
50 } 49 }
51 50
52 PageOverlay::PageOverlay(WebViewImpl* viewImpl, WebPageOverlay* overlay) 51 PageOverlay::PageOverlay(WebViewImpl* viewImpl, PassOwnPtr<PageOverlay::Delegate > overlay)
53 : m_viewImpl(viewImpl) 52 : m_viewImpl(viewImpl)
54 , m_overlay(overlay) 53 , m_overlay(overlay)
55 , m_zOrder(0)
56 { 54 {
57 } 55 }
58 56
59 void PageOverlay::clear() 57 PageOverlay::~PageOverlay()
60 { 58 {
61 invalidateWebFrame(); 59 invalidateWebFrame();
62 60
63 if (m_layer) { 61 if (m_layer) {
64 m_layer->removeFromParent(); 62 m_layer->removeFromParent();
65 if (WebDevToolsAgentImpl* devTools = m_viewImpl->mainFrameDevToolsAgentI mpl()) 63 if (WebDevToolsAgentImpl* devTools = m_viewImpl->mainFrameDevToolsAgentI mpl())
66 devTools->didRemovePageOverlay(m_layer.get()); 64 devTools->didRemovePageOverlay(m_layer.get());
67 m_layer = nullptr; 65 m_layer = nullptr;
68 } 66 }
69 } 67 }
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 WebSize size = m_viewImpl->size(); 124 WebSize size = m_viewImpl->size();
127 if (m_viewImpl->page()) 125 if (m_viewImpl->page())
128 size = expandedIntSize(m_viewImpl->page()->frameHost().visualViewpor t().visibleSize()); 126 size = expandedIntSize(m_viewImpl->page()->frameHost().visualViewpor t().visibleSize());
129 WebRect damagedRect(0, 0, size.width, size.height); 127 WebRect damagedRect(0, 0, size.width, size.height);
130 if (m_viewImpl->client()) 128 if (m_viewImpl->client())
131 m_viewImpl->client()->didInvalidateRect(damagedRect); 129 m_viewImpl->client()->didInvalidateRect(damagedRect);
132 } 130 }
133 } 131 }
134 132
135 } // namespace blink 133 } // namespace blink
OLDNEW
« no previous file with comments | « Source/web/PageOverlay.h ('k') | Source/web/PageOverlayList.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698