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

Side by Side Diff: extensions/browser/api/web_view/web_view_internal_api.cc

Issue 690263003: <webview>: Remove broken captureVisibleRegion code until feature is properly supported (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "extensions/browser/api/web_view/web_view_internal_api.h" 5 #include "extensions/browser/api/web_view/web_view_internal_api.h"
6 6
7 #include "base/strings/stringprintf.h" 7 #include "base/strings/stringprintf.h"
8 #include "base/strings/utf_string_conversions.h" 8 #include "base/strings/utf_string_conversions.h"
9 #include "content/public/browser/render_process_host.h" 9 #include "content/public/browser/render_process_host.h"
10 #include "content/public/browser/render_view_host.h" 10 #include "content/public/browser/render_view_host.h"
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 error, on_url, result); 146 error, on_url, result);
147 } 147 }
148 148
149 WebViewInternalInsertCSSFunction::WebViewInternalInsertCSSFunction() { 149 WebViewInternalInsertCSSFunction::WebViewInternalInsertCSSFunction() {
150 } 150 }
151 151
152 bool WebViewInternalInsertCSSFunction::ShouldInsertCSS() const { 152 bool WebViewInternalInsertCSSFunction::ShouldInsertCSS() const {
153 return true; 153 return true;
154 } 154 }
155 155
156 WebViewInternalCaptureVisibleRegionFunction::
157 WebViewInternalCaptureVisibleRegionFunction() {
158 }
159
160 WebViewInternalCaptureVisibleRegionFunction::
161 ~WebViewInternalCaptureVisibleRegionFunction() {
162 }
163
164 bool WebViewInternalCaptureVisibleRegionFunction::IsScreenshotEnabled() {
165 return true;
166 }
167
168 WebContents* WebViewInternalCaptureVisibleRegionFunction::GetWebContentsForID(
169 int instance_id) {
170 WebViewGuest* guest = WebViewGuest::From(
171 render_view_host()->GetProcess()->GetID(), instance_id);
172 return guest ? guest->web_contents() : NULL;
173 }
174
175 void WebViewInternalCaptureVisibleRegionFunction::OnCaptureFailure(
176 FailureReason reason) {
177 SendResponse(false);
178 }
179
180 WebViewInternalSetNameFunction::WebViewInternalSetNameFunction() { 156 WebViewInternalSetNameFunction::WebViewInternalSetNameFunction() {
181 } 157 }
182 158
183 WebViewInternalSetNameFunction::~WebViewInternalSetNameFunction() { 159 WebViewInternalSetNameFunction::~WebViewInternalSetNameFunction() {
184 } 160 }
185 161
186 bool WebViewInternalSetNameFunction::RunAsyncSafe(WebViewGuest* guest) { 162 bool WebViewInternalSetNameFunction::RunAsyncSafe(WebViewGuest* guest) {
187 scoped_ptr<webview::SetName::Params> params( 163 scoped_ptr<webview::SetName::Params> params(
188 webview::SetName::Params::Create(*args_)); 164 webview::SetName::Params::Create(*args_));
189 EXTENSION_FUNCTION_VALIDATE(params.get()); 165 EXTENSION_FUNCTION_VALIDATE(params.get());
(...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after
517 // Will finish asynchronously. 493 // Will finish asynchronously.
518 return true; 494 return true;
519 } 495 }
520 496
521 void WebViewInternalClearDataFunction::ClearDataDone() { 497 void WebViewInternalClearDataFunction::ClearDataDone() {
522 Release(); // Balanced in RunAsync(). 498 Release(); // Balanced in RunAsync().
523 SendResponse(true); 499 SendResponse(true);
524 } 500 }
525 501
526 } // namespace extensions 502 } // namespace extensions
OLDNEW
« no previous file with comments | « extensions/browser/api/web_view/web_view_internal_api.h ('k') | extensions/common/api/web_view_internal.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698