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

Side by Side Diff: chrome/browser/extensions/api/webview/webview_api.cc

Issue 291483010: <webview>: Move name attribute to chrome (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@newwindow_refactor
Patch Set: Addressed John's comments Created 6 years, 7 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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 "chrome/browser/extensions/api/webview/webview_api.h" 5 #include "chrome/browser/extensions/api/webview/webview_api.h"
6 6
7 #include "base/strings/utf_string_conversions.h" 7 #include "base/strings/utf_string_conversions.h"
8 #include "chrome/browser/extensions/api/browsing_data/browsing_data_api.h" 8 #include "chrome/browser/extensions/api/browsing_data/browsing_data_api.h"
9 #include "chrome/browser/extensions/api/context_menus/context_menus_api.h" 9 #include "chrome/browser/extensions/api/context_menus/context_menus_api.h"
10 #include "chrome/browser/extensions/api/context_menus/context_menus_api_helpers. h" 10 #include "chrome/browser/extensions/api/context_menus/context_menus_api_helpers. h"
(...skipping 331 matching lines...) Expand 10 before | Expand all | Expand 10 after
342 WebViewGuest* guest = WebViewGuest::From( 342 WebViewGuest* guest = WebViewGuest::From(
343 render_view_host()->GetProcess()->GetID(), instance_id); 343 render_view_host()->GetProcess()->GetID(), instance_id);
344 return guest ? guest->guest_web_contents() : NULL; 344 return guest ? guest->guest_web_contents() : NULL;
345 } 345 }
346 346
347 void WebviewCaptureVisibleRegionFunction::OnCaptureFailure( 347 void WebviewCaptureVisibleRegionFunction::OnCaptureFailure(
348 FailureReason reason) { 348 FailureReason reason) {
349 SendResponse(false); 349 SendResponse(false);
350 } 350 }
351 351
352 WebviewSetNameFunction::WebviewSetNameFunction() {
353 }
354
355 WebviewSetNameFunction::~WebviewSetNameFunction() {
356 }
357
352 WebviewSetZoomFunction::WebviewSetZoomFunction() { 358 WebviewSetZoomFunction::WebviewSetZoomFunction() {
353 } 359 }
354 360
355 WebviewSetZoomFunction::~WebviewSetZoomFunction() { 361 WebviewSetZoomFunction::~WebviewSetZoomFunction() {
356 } 362 }
357 363
364 bool WebviewSetNameFunction::RunAsyncSafe(WebViewGuest* guest) {
365 scoped_ptr<webview::SetName::Params> params(
366 webview::SetName::Params::Create(*args_));
367 EXTENSION_FUNCTION_VALIDATE(params.get());
368 guest->SetName(params->frame_name);
369 SendResponse(true);
370 return true;
371 }
372
358 bool WebviewSetZoomFunction::RunAsyncSafe(WebViewGuest* guest) { 373 bool WebviewSetZoomFunction::RunAsyncSafe(WebViewGuest* guest) {
359 scoped_ptr<webview::SetZoom::Params> params( 374 scoped_ptr<webview::SetZoom::Params> params(
360 webview::SetZoom::Params::Create(*args_)); 375 webview::SetZoom::Params::Create(*args_));
361 EXTENSION_FUNCTION_VALIDATE(params.get()); 376 EXTENSION_FUNCTION_VALIDATE(params.get());
362 guest->SetZoom(params->zoom_factor); 377 guest->SetZoom(params->zoom_factor);
363 378
364 SendResponse(true); 379 SendResponse(true);
365 return true; 380 return true;
366 } 381 }
367 382
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
558 573
559 WebviewTerminateFunction::~WebviewTerminateFunction() { 574 WebviewTerminateFunction::~WebviewTerminateFunction() {
560 } 575 }
561 576
562 bool WebviewTerminateFunction::RunAsyncSafe(WebViewGuest* guest) { 577 bool WebviewTerminateFunction::RunAsyncSafe(WebViewGuest* guest) {
563 guest->Terminate(); 578 guest->Terminate();
564 return true; 579 return true;
565 } 580 }
566 581
567 } // namespace extensions 582 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/api/webview/webview_api.h ('k') | chrome/browser/guest_view/web_view/web_view_constants.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698