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

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

Issue 618823002: GuestView: Move lifetime management out of content (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added comment Created 6 years, 2 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 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
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
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
OLDNEW
« no previous file with comments | « extensions/browser/api/guest_view/guest_view_internal_api.cc ('k') | extensions/browser/extension_function_histogram_value.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698