OLD | NEW |
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 20 matching lines...) Expand all Loading... |
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/WebViewClient.h" | 39 #include "public/web/WebViewClient.h" |
40 #include "web/WebDevToolsAgentImpl.h" | 40 #include "web/WebDevToolsAgentImpl.h" |
41 #include "web/WebGraphicsContextImpl.h" | |
42 #include "web/WebViewImpl.h" | 41 #include "web/WebViewImpl.h" |
43 | 42 |
44 namespace blink { | 43 namespace blink { |
45 | 44 |
46 PassOwnPtr<PageOverlay> PageOverlay::create(WebViewImpl* viewImpl, PageOverlay::
Delegate* delegate) | 45 PassOwnPtr<PageOverlay> PageOverlay::create(WebViewImpl* viewImpl, PageOverlay::
Delegate* delegate) |
47 { | 46 { |
48 return adoptPtr(new PageOverlay(viewImpl, delegate)); | 47 return adoptPtr(new PageOverlay(viewImpl, delegate)); |
49 } | 48 } |
50 | 49 |
51 PageOverlay::PageOverlay(WebViewImpl* viewImpl, PageOverlay::Delegate* delegate) | 50 PageOverlay::PageOverlay(WebViewImpl* viewImpl, PageOverlay::Delegate* delegate) |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
98 } | 97 } |
99 | 98 |
100 void PageOverlay::paintContents(const GraphicsLayer* graphicsLayer, GraphicsCont
ext& gc, GraphicsLayerPaintingPhase phase, const IntRect& inClip) const | 99 void PageOverlay::paintContents(const GraphicsLayer* graphicsLayer, GraphicsCont
ext& gc, GraphicsLayerPaintingPhase phase, const IntRect& inClip) const |
101 { | 100 { |
102 paintContentsIfNeeded(graphicsLayer, gc, phase); | 101 paintContentsIfNeeded(graphicsLayer, gc, phase); |
103 } | 102 } |
104 | 103 |
105 void PageOverlay::paintContentsIfNeeded(const GraphicsLayer*, GraphicsContext& g
c, GraphicsLayerPaintingPhase) const | 104 void PageOverlay::paintContentsIfNeeded(const GraphicsLayer*, GraphicsContext& g
c, GraphicsLayerPaintingPhase) const |
106 { | 105 { |
107 ASSERT(m_layer); | 106 ASSERT(m_layer); |
108 WebGraphicsContextImpl contextWrapper(gc, *this, DisplayItem::PageOverlay); | 107 m_delegate->paintPageOverlay(*this, gc, expandedIntSize(m_layer->size())); |
109 m_delegate->paintPageOverlay(&contextWrapper, expandedIntSize(m_layer->size(
))); | |
110 } | 108 } |
111 | 109 |
112 String PageOverlay::debugName(const GraphicsLayer*) | 110 String PageOverlay::debugName(const GraphicsLayer*) |
113 { | 111 { |
114 return "WebViewImpl Page Overlay Content Layer"; | 112 return "WebViewImpl Page Overlay Content Layer"; |
115 } | 113 } |
116 | 114 |
117 } // namespace blink | 115 } // namespace blink |
OLD | NEW |