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

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

Issue 584713002: Browser Plugin: Remove dependency on NPAPI (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@move_content_window
Patch Set: Updated histograms.xml Created 6 years, 3 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 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/utf_string_conversions.h" 7 #include "base/strings/utf_string_conversions.h"
8 #include "content/public/browser/render_process_host.h" 8 #include "content/public/browser/render_process_host.h"
9 #include "content/public/browser/render_view_host.h" 9 #include "content/public/browser/render_view_host.h"
10 #include "content/public/browser/storage_partition.h" 10 #include "content/public/browser/storage_partition.h"
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 FailureReason reason) { 173 FailureReason reason) {
174 SendResponse(false); 174 SendResponse(false);
175 } 175 }
176 176
177 WebViewInternalSetNameFunction::WebViewInternalSetNameFunction() { 177 WebViewInternalSetNameFunction::WebViewInternalSetNameFunction() {
178 } 178 }
179 179
180 WebViewInternalSetNameFunction::~WebViewInternalSetNameFunction() { 180 WebViewInternalSetNameFunction::~WebViewInternalSetNameFunction() {
181 } 181 }
182 182
183 WebViewInternalSetZoomFunction::WebViewInternalSetZoomFunction() {
184 }
185
186 WebViewInternalSetZoomFunction::~WebViewInternalSetZoomFunction() {
187 }
188
189 bool WebViewInternalSetNameFunction::RunAsyncSafe(WebViewGuest* guest) { 183 bool WebViewInternalSetNameFunction::RunAsyncSafe(WebViewGuest* guest) {
190 scoped_ptr<webview::SetName::Params> params( 184 scoped_ptr<webview::SetName::Params> params(
191 webview::SetName::Params::Create(*args_)); 185 webview::SetName::Params::Create(*args_));
192 EXTENSION_FUNCTION_VALIDATE(params.get()); 186 EXTENSION_FUNCTION_VALIDATE(params.get());
193 guest->SetName(params->frame_name); 187 guest->SetName(params->frame_name);
194 SendResponse(true); 188 SendResponse(true);
195 return true; 189 return true;
196 } 190 }
197 191
192 WebViewInternalSetAllowTransparencyFunction::
193 WebViewInternalSetAllowTransparencyFunction() {
194 }
195
196 WebViewInternalSetAllowTransparencyFunction::
197 ~WebViewInternalSetAllowTransparencyFunction() {
198 }
199
200 bool WebViewInternalSetAllowTransparencyFunction::RunAsyncSafe(
201 WebViewGuest* guest) {
202 scoped_ptr<webview::SetAllowTransparency::Params> params(
203 webview::SetAllowTransparency::Params::Create(*args_));
204 EXTENSION_FUNCTION_VALIDATE(params.get());
205 guest->SetAllowTransparency(params->allow);
206 SendResponse(true);
207 return true;
208 }
209
210 WebViewInternalSetZoomFunction::WebViewInternalSetZoomFunction() {
211 }
212
213 WebViewInternalSetZoomFunction::~WebViewInternalSetZoomFunction() {
214 }
215
198 bool WebViewInternalSetZoomFunction::RunAsyncSafe(WebViewGuest* guest) { 216 bool WebViewInternalSetZoomFunction::RunAsyncSafe(WebViewGuest* guest) {
199 scoped_ptr<webview::SetZoom::Params> params( 217 scoped_ptr<webview::SetZoom::Params> params(
200 webview::SetZoom::Params::Create(*args_)); 218 webview::SetZoom::Params::Create(*args_));
201 EXTENSION_FUNCTION_VALIDATE(params.get()); 219 EXTENSION_FUNCTION_VALIDATE(params.get());
202 guest->SetZoom(params->zoom_factor); 220 guest->SetZoom(params->zoom_factor);
203 221
204 SendResponse(true); 222 SendResponse(true);
205 return true; 223 return true;
206 } 224 }
207 225
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after
469 // Will finish asynchronously. 487 // Will finish asynchronously.
470 return true; 488 return true;
471 } 489 }
472 490
473 void WebViewInternalClearDataFunction::ClearDataDone() { 491 void WebViewInternalClearDataFunction::ClearDataDone() {
474 Release(); // Balanced in RunAsync(). 492 Release(); // Balanced in RunAsync().
475 SendResponse(true); 493 SendResponse(true);
476 } 494 }
477 495
478 } // namespace extensions 496 } // namespace extensions
OLDNEW
« no previous file with comments | « extensions/browser/api/web_view/web_view_internal_api.h ('k') | extensions/browser/extension_function_histogram_value.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698