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 22 matching lines...) Expand all Loading... |
33 #include "core/page/Page.h" | 33 #include "core/page/Page.h" |
34 #include "core/page/scrolling/ScrollingCoordinator.h" | 34 #include "core/page/scrolling/ScrollingCoordinator.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 "platform/scroll/MainThreadScrollingReason.h" | 38 #include "platform/scroll/MainThreadScrollingReason.h" |
39 #include "public/platform/WebLayer.h" | 39 #include "public/platform/WebLayer.h" |
40 #include "public/web/WebViewClient.h" | 40 #include "public/web/WebViewClient.h" |
41 #include "web/WebDevToolsAgentImpl.h" | 41 #include "web/WebDevToolsAgentImpl.h" |
42 #include "web/WebViewImpl.h" | 42 #include "web/WebViewImpl.h" |
43 #include "wtf/PtrUtil.h" | |
44 #include <memory> | |
45 | 43 |
46 namespace blink { | 44 namespace blink { |
47 | 45 |
48 std::unique_ptr<PageOverlay> PageOverlay::create(WebViewImpl* viewImpl, PageOver
lay::Delegate* delegate) | 46 PassOwnPtr<PageOverlay> PageOverlay::create(WebViewImpl* viewImpl, PageOverlay::
Delegate* delegate) |
49 { | 47 { |
50 return wrapUnique(new PageOverlay(viewImpl, delegate)); | 48 return adoptPtr(new PageOverlay(viewImpl, delegate)); |
51 } | 49 } |
52 | 50 |
53 PageOverlay::PageOverlay(WebViewImpl* viewImpl, PageOverlay::Delegate* delegate) | 51 PageOverlay::PageOverlay(WebViewImpl* viewImpl, PageOverlay::Delegate* delegate) |
54 : m_viewImpl(viewImpl) | 52 : m_viewImpl(viewImpl) |
55 , m_delegate(delegate) | 53 , m_delegate(delegate) |
56 { | 54 { |
57 } | 55 } |
58 | 56 |
59 PageOverlay::~PageOverlay() | 57 PageOverlay::~PageOverlay() |
60 { | 58 { |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
115 DCHECK(m_layer); | 113 DCHECK(m_layer); |
116 m_delegate->paintPageOverlay(*this, gc, interestRect.size()); | 114 m_delegate->paintPageOverlay(*this, gc, interestRect.size()); |
117 } | 115 } |
118 | 116 |
119 String PageOverlay::debugName(const GraphicsLayer*) const | 117 String PageOverlay::debugName(const GraphicsLayer*) const |
120 { | 118 { |
121 return "WebViewImpl Page Overlay Content Layer"; | 119 return "WebViewImpl Page Overlay Content Layer"; |
122 } | 120 } |
123 | 121 |
124 } // namespace blink | 122 } // namespace blink |
OLD | NEW |