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

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

Issue 2896563002: Update WebLocalFrameImpl with WebLocalFrameBase to break dependencies. (Closed)
Patch Set: Rebase Created 3 years, 6 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 28 matching lines...) Expand all
39 #include "platform/scroll/MainThreadScrollingReason.h" 39 #include "platform/scroll/MainThreadScrollingReason.h"
40 #include "platform/wtf/PtrUtil.h" 40 #include "platform/wtf/PtrUtil.h"
41 #include "public/platform/WebLayer.h" 41 #include "public/platform/WebLayer.h"
42 #include "public/web/WebViewClient.h" 42 #include "public/web/WebViewClient.h"
43 #include "web/WebDevToolsAgentImpl.h" 43 #include "web/WebDevToolsAgentImpl.h"
44 #include "web/WebFrameWidgetImpl.h" 44 #include "web/WebFrameWidgetImpl.h"
45 45
46 namespace blink { 46 namespace blink {
47 47
48 std::unique_ptr<PageOverlay> PageOverlay::Create( 48 std::unique_ptr<PageOverlay> PageOverlay::Create(
49 WebLocalFrameImpl* frame_impl, 49 WebLocalFrameBase* frame_impl,
50 std::unique_ptr<PageOverlay::Delegate> delegate) { 50 std::unique_ptr<PageOverlay::Delegate> delegate) {
51 return WTF::WrapUnique(new PageOverlay(frame_impl, std::move(delegate))); 51 return WTF::WrapUnique(new PageOverlay(frame_impl, std::move(delegate)));
52 } 52 }
53 53
54 PageOverlay::PageOverlay(WebLocalFrameImpl* frame_impl, 54 PageOverlay::PageOverlay(WebLocalFrameBase* frame_impl,
55 std::unique_ptr<PageOverlay::Delegate> delegate) 55 std::unique_ptr<PageOverlay::Delegate> delegate)
56 : frame_impl_(frame_impl), delegate_(std::move(delegate)) {} 56 : frame_impl_(frame_impl), delegate_(std::move(delegate)) {}
57 57
58 PageOverlay::~PageOverlay() { 58 PageOverlay::~PageOverlay() {
59 if (!layer_) 59 if (!layer_)
60 return; 60 return;
61 61
62 layer_->RemoveFromParent(); 62 layer_->RemoveFromParent();
63 if (WebDevToolsAgentImpl* dev_tools = frame_impl_->DevToolsAgentImpl()) 63 if (WebDevToolsAgentImpl* dev_tools = frame_impl_->DevToolsAgentImpl())
64 dev_tools->DidRemovePageOverlay(layer_.get()); 64 dev_tools->DidRemovePageOverlay(layer_.get());
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 const IntRect& interest_rect) const { 118 const IntRect& interest_rect) const {
119 DCHECK(layer_); 119 DCHECK(layer_);
120 delegate_->PaintPageOverlay(*this, gc, interest_rect.Size()); 120 delegate_->PaintPageOverlay(*this, gc, interest_rect.Size());
121 } 121 }
122 122
123 String PageOverlay::DebugName(const GraphicsLayer*) const { 123 String PageOverlay::DebugName(const GraphicsLayer*) const {
124 return "WebViewImpl Page Overlay Content Layer"; 124 return "WebViewImpl Page Overlay Content Layer";
125 } 125 }
126 126
127 } // namespace blink 127 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/PageOverlay.h ('k') | third_party/WebKit/Source/web/WebLocalFrameImpl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698