| OLD | NEW |
| 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 387 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 398 | 398 |
| 399 WebViewInternalGetZoomFunction::~WebViewInternalGetZoomFunction() { | 399 WebViewInternalGetZoomFunction::~WebViewInternalGetZoomFunction() { |
| 400 } | 400 } |
| 401 | 401 |
| 402 bool WebViewInternalGetZoomFunction::RunAsyncSafe(WebViewGuest* guest) { | 402 bool WebViewInternalGetZoomFunction::RunAsyncSafe(WebViewGuest* guest) { |
| 403 scoped_ptr<webview::GetZoom::Params> params( | 403 scoped_ptr<webview::GetZoom::Params> params( |
| 404 webview::GetZoom::Params::Create(*args_)); | 404 webview::GetZoom::Params::Create(*args_)); |
| 405 EXTENSION_FUNCTION_VALIDATE(params.get()); | 405 EXTENSION_FUNCTION_VALIDATE(params.get()); |
| 406 | 406 |
| 407 double zoom_factor = guest->GetZoom(); | 407 double zoom_factor = guest->GetZoom(); |
| 408 SetResult(base::Value::CreateDoubleValue(zoom_factor)); | 408 SetResult(new base::FundamentalValue(zoom_factor)); |
| 409 SendResponse(true); | 409 SendResponse(true); |
| 410 return true; | 410 return true; |
| 411 } | 411 } |
| 412 | 412 |
| 413 WebViewInternalFindFunction::WebViewInternalFindFunction() { | 413 WebViewInternalFindFunction::WebViewInternalFindFunction() { |
| 414 } | 414 } |
| 415 | 415 |
| 416 WebViewInternalFindFunction::~WebViewInternalFindFunction() { | 416 WebViewInternalFindFunction::~WebViewInternalFindFunction() { |
| 417 } | 417 } |
| 418 | 418 |
| (...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 |
| OLD | NEW |