| 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 "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 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 206 } | 206 } |
| 207 | 207 |
| 208 WebViewInternalGetZoomFunction::~WebViewInternalGetZoomFunction() { | 208 WebViewInternalGetZoomFunction::~WebViewInternalGetZoomFunction() { |
| 209 } | 209 } |
| 210 | 210 |
| 211 bool WebViewInternalGetZoomFunction::RunAsyncSafe(WebViewGuest* guest) { | 211 bool WebViewInternalGetZoomFunction::RunAsyncSafe(WebViewGuest* guest) { |
| 212 scoped_ptr<webview::GetZoom::Params> params( | 212 scoped_ptr<webview::GetZoom::Params> params( |
| 213 webview::GetZoom::Params::Create(*args_)); | 213 webview::GetZoom::Params::Create(*args_)); |
| 214 EXTENSION_FUNCTION_VALIDATE(params.get()); | 214 EXTENSION_FUNCTION_VALIDATE(params.get()); |
| 215 | 215 |
| 216 double zoom_factor = guest->GetZoom(); | 216 double zoom_factor = guest->zoom(); |
| 217 SetResult(new base::FundamentalValue(zoom_factor)); | 217 SetResult(new base::FundamentalValue(zoom_factor)); |
| 218 SendResponse(true); | 218 SendResponse(true); |
| 219 return true; | 219 return true; |
| 220 } | 220 } |
| 221 | 221 |
| 222 WebViewInternalFindFunction::WebViewInternalFindFunction() { | 222 WebViewInternalFindFunction::WebViewInternalFindFunction() { |
| 223 } | 223 } |
| 224 | 224 |
| 225 WebViewInternalFindFunction::~WebViewInternalFindFunction() { | 225 WebViewInternalFindFunction::~WebViewInternalFindFunction() { |
| 226 } | 226 } |
| (...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 493 // Will finish asynchronously. | 493 // Will finish asynchronously. |
| 494 return true; | 494 return true; |
| 495 } | 495 } |
| 496 | 496 |
| 497 void WebViewInternalClearDataFunction::ClearDataDone() { | 497 void WebViewInternalClearDataFunction::ClearDataDone() { |
| 498 Release(); // Balanced in RunAsync(). | 498 Release(); // Balanced in RunAsync(). |
| 499 SendResponse(true); | 499 SendResponse(true); |
| 500 } | 500 } |
| 501 | 501 |
| 502 } // namespace extensions | 502 } // namespace extensions |
| OLD | NEW |