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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 return false; | 58 return false; |
59 | 59 |
60 return RunAsyncSafe(guest); | 60 return RunAsyncSafe(guest); |
61 } | 61 } |
62 | 62 |
63 bool WebViewInternalNavigateFunction::RunAsyncSafe(WebViewGuest* guest) { | 63 bool WebViewInternalNavigateFunction::RunAsyncSafe(WebViewGuest* guest) { |
64 scoped_ptr<webview::Navigate::Params> params( | 64 scoped_ptr<webview::Navigate::Params> params( |
65 webview::Navigate::Params::Create(*args_)); | 65 webview::Navigate::Params::Create(*args_)); |
66 EXTENSION_FUNCTION_VALIDATE(params.get()); | 66 EXTENSION_FUNCTION_VALIDATE(params.get()); |
67 std::string src = params->src; | 67 std::string src = params->src; |
68 guest->NavigateGuest(src); | 68 guest->NavigateGuest(src, true /* force_navigation */); |
69 return true; | 69 return true; |
70 } | 70 } |
71 | 71 |
72 WebViewInternalExecuteCodeFunction::WebViewInternalExecuteCodeFunction() | 72 WebViewInternalExecuteCodeFunction::WebViewInternalExecuteCodeFunction() |
73 : guest_instance_id_(0), guest_src_(GURL::EmptyGURL()) { | 73 : guest_instance_id_(0), guest_src_(GURL::EmptyGURL()) { |
74 } | 74 } |
75 | 75 |
76 WebViewInternalExecuteCodeFunction::~WebViewInternalExecuteCodeFunction() { | 76 WebViewInternalExecuteCodeFunction::~WebViewInternalExecuteCodeFunction() { |
77 } | 77 } |
78 | 78 |
(...skipping 434 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
513 // Will finish asynchronously. | 513 // Will finish asynchronously. |
514 return true; | 514 return true; |
515 } | 515 } |
516 | 516 |
517 void WebViewInternalClearDataFunction::ClearDataDone() { | 517 void WebViewInternalClearDataFunction::ClearDataDone() { |
518 Release(); // Balanced in RunAsync(). | 518 Release(); // Balanced in RunAsync(). |
519 SendResponse(true); | 519 SendResponse(true); |
520 } | 520 } |
521 | 521 |
522 } // namespace extensions | 522 } // namespace extensions |
OLD | NEW |