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

Side by Side Diff: android_webview/renderer/aw_render_view_ext.cc

Issue 2034153002: Makes RenderFrameObserver/RenderViewObserver::OnDestruct pure virtual. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed comments. Created 4 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 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "android_webview/renderer/aw_render_view_ext.h" 5 #include "android_webview/renderer/aw_render_view_ext.h"
6 #include "android_webview/common/render_view_messages.h" 6 #include "android_webview/common/render_view_messages.h"
7 #include "content/public/renderer/render_frame.h" 7 #include "content/public/renderer/render_frame.h"
8 #include "content/public/renderer/render_view.h" 8 #include "content/public/renderer/render_view.h"
9 #include "third_party/WebKit/public/web/WebFrame.h" 9 #include "third_party/WebKit/public/web/WebFrame.h"
10 #include "third_party/WebKit/public/web/WebView.h" 10 #include "third_party/WebKit/public/web/WebView.h"
(...skipping 11 matching lines...) Expand all
22 } 22 }
23 23
24 void AwRenderViewExt::DidCommitCompositorFrame() { 24 void AwRenderViewExt::DidCommitCompositorFrame() {
25 PostCheckContentsSize(); 25 PostCheckContentsSize();
26 } 26 }
27 27
28 void AwRenderViewExt::DidUpdateLayout() { 28 void AwRenderViewExt::DidUpdateLayout() {
29 PostCheckContentsSize(); 29 PostCheckContentsSize();
30 } 30 }
31 31
32 void AwRenderViewExt::OnDestruct() {
33 delete this;
34 }
35
32 void AwRenderViewExt::PostCheckContentsSize() { 36 void AwRenderViewExt::PostCheckContentsSize() {
33 if (check_contents_size_timer_.IsRunning()) 37 if (check_contents_size_timer_.IsRunning())
34 return; 38 return;
35 39
36 check_contents_size_timer_.Start(FROM_HERE, 40 check_contents_size_timer_.Start(FROM_HERE,
37 base::TimeDelta::FromMilliseconds(0), this, 41 base::TimeDelta::FromMilliseconds(0), this,
38 &AwRenderViewExt::CheckContentsSize); 42 &AwRenderViewExt::CheckContentsSize);
39 } 43 }
40 44
41 void AwRenderViewExt::CheckContentsSize() { 45 void AwRenderViewExt::CheckContentsSize() {
(...skipping 24 matching lines...) Expand all
66 70
67 if (contents_size == last_sent_contents_size_) 71 if (contents_size == last_sent_contents_size_)
68 return; 72 return;
69 73
70 last_sent_contents_size_ = contents_size; 74 last_sent_contents_size_ = contents_size;
71 main_render_frame->Send(new AwViewHostMsg_OnContentsSizeChanged( 75 main_render_frame->Send(new AwViewHostMsg_OnContentsSizeChanged(
72 main_render_frame->GetRoutingID(), contents_size)); 76 main_render_frame->GetRoutingID(), contents_size));
73 } 77 }
74 78
75 } // namespace android_webview 79 } // namespace android_webview
OLDNEW
« no previous file with comments | « android_webview/renderer/aw_render_view_ext.h ('k') | android_webview/renderer/print_render_frame_observer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698