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

Side by Side Diff: android_webview/browser/renderer_host/aw_render_view_host_ext.cc

Issue 11823027: [Android WebView] Implement the capture picture API. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: adding findbugs update from 11825002 to make the trybots happy. Created 7 years, 11 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
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/browser/renderer_host/aw_render_view_host_ext.h" 5 #include "android_webview/browser/renderer_host/aw_render_view_host_ext.h"
6 6
7 #include "android_webview/common/render_view_messages.h" 7 #include "android_webview/common/render_view_messages.h"
8 #include "base/android/scoped_java_ref.h" 8 #include "base/android/scoped_java_ref.h"
9 #include "base/callback.h" 9 #include "base/callback.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 Send(new AwViewMsg_DoHitTest(web_contents()->GetRoutingID(), 54 Send(new AwViewMsg_DoHitTest(web_contents()->GetRoutingID(),
55 view_x, 55 view_x,
56 view_y)); 56 view_y));
57 } 57 }
58 58
59 const AwHitTestData& AwRenderViewHostExt::GetLastHitTestData() const { 59 const AwHitTestData& AwRenderViewHostExt::GetLastHitTestData() const {
60 DCHECK(CalledOnValidThread()); 60 DCHECK(CalledOnValidThread());
61 return last_hit_test_data_; 61 return last_hit_test_data_;
62 } 62 }
63 63
64 void AwRenderViewHostExt::EnableCapturePictureCallback(bool enabled) {
65 Send(new AwViewMsg_EnableCapturePictureCallback(
66 web_contents()->GetRoutingID(), enabled));
67 }
68
64 void AwRenderViewHostExt::RenderViewGone(base::TerminationStatus status) { 69 void AwRenderViewHostExt::RenderViewGone(base::TerminationStatus status) {
65 DCHECK(CalledOnValidThread()); 70 DCHECK(CalledOnValidThread());
66 for (std::map<int, DocumentHasImagesResult>::iterator pending_req = 71 for (std::map<int, DocumentHasImagesResult>::iterator pending_req =
67 pending_document_has_images_requests_.begin(); 72 pending_document_has_images_requests_.begin();
68 pending_req != pending_document_has_images_requests_.end(); 73 pending_req != pending_document_has_images_requests_.end();
69 ++pending_req) { 74 ++pending_req) {
70 pending_req->second.Run(false); 75 pending_req->second.Run(false);
71 } 76 }
72 } 77 }
73 78
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 last_hit_test_data_ = hit_test_data; 110 last_hit_test_data_ = hit_test_data;
106 has_new_hit_test_data_ = true; 111 has_new_hit_test_data_ = true;
107 } 112 }
108 113
109 void AwRenderViewHostExt::OnPictureUpdated() { 114 void AwRenderViewHostExt::OnPictureUpdated() {
110 if (client_) 115 if (client_)
111 client_->OnPictureUpdated(web_contents()->GetRenderProcessHost()->GetID(), 116 client_->OnPictureUpdated(web_contents()->GetRenderProcessHost()->GetID(),
112 routing_id()); 117 routing_id());
113 } 118 }
114 119
120 void AwRenderViewHostExt::CapturePictureSync() {
121 Send(new AwViewMsg_CapturePictureSync(web_contents()->GetRoutingID()));
122 }
123
115 } // namespace android_webview 124 } // namespace android_webview
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698