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

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

Issue 399493002: Remove many instances of CreateBooleanValue. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 5 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 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 "chrome/browser/extensions/api/web_view/web_view_internal_api.h" 5 #include "chrome/browser/extensions/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 "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 517 matching lines...) Expand 10 before | Expand all | Expand 10 after
528 WebViewPermissionHelper* web_view_permission_helper = 528 WebViewPermissionHelper* web_view_permission_helper =
529 WebViewPermissionHelper:: FromWebContents(guest->guest_web_contents()); 529 WebViewPermissionHelper:: FromWebContents(guest->guest_web_contents());
530 530
531 WebViewPermissionHelper::SetPermissionResult result = 531 WebViewPermissionHelper::SetPermissionResult result =
532 web_view_permission_helper->SetPermission( 532 web_view_permission_helper->SetPermission(
533 params->request_id, action, user_input); 533 params->request_id, action, user_input);
534 534
535 EXTENSION_FUNCTION_VALIDATE( 535 EXTENSION_FUNCTION_VALIDATE(
536 result != WebViewPermissionHelper::SET_PERMISSION_INVALID); 536 result != WebViewPermissionHelper::SET_PERMISSION_INVALID);
537 537
538 SetResult(base::Value::CreateBooleanValue( 538 SetResult(new base::FundamentalValue(
539 result == WebViewPermissionHelper::SET_PERMISSION_ALLOWED)); 539 result == WebViewPermissionHelper::SET_PERMISSION_ALLOWED));
540 SendResponse(true); 540 SendResponse(true);
541 return true; 541 return true;
542 } 542 }
543 543
544 WebViewInternalShowContextMenuFunction:: 544 WebViewInternalShowContextMenuFunction::
545 WebViewInternalShowContextMenuFunction() { 545 WebViewInternalShowContextMenuFunction() {
546 } 546 }
547 547
548 WebViewInternalShowContextMenuFunction:: 548 WebViewInternalShowContextMenuFunction::
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
596 596
597 WebViewInternalTerminateFunction::~WebViewInternalTerminateFunction() { 597 WebViewInternalTerminateFunction::~WebViewInternalTerminateFunction() {
598 } 598 }
599 599
600 bool WebViewInternalTerminateFunction::RunAsyncSafe(WebViewGuest* guest) { 600 bool WebViewInternalTerminateFunction::RunAsyncSafe(WebViewGuest* guest) {
601 guest->Terminate(); 601 guest->Terminate();
602 return true; 602 return true;
603 } 603 }
604 604
605 } // namespace extensions 605 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698