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

Side by Side Diff: extensions/browser/api/guest_view/app_view/app_view_guest_internal_api.cc

Issue 1181893003: Kill bad apps. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed Check for Termination Status (Windows Problems) Created 5 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
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/guest_view/app_view/app_view_guest_internal_api .h" 5 #include "extensions/browser/api/guest_view/app_view/app_view_guest_internal_api .h"
6 6
7 #include "content/public/browser/render_frame_host.h"
7 #include "extensions/browser/guest_view/app_view/app_view_guest.h" 8 #include "extensions/browser/guest_view/app_view/app_view_guest.h"
8 #include "extensions/common/api/app_view_guest_internal.h" 9 #include "extensions/common/api/app_view_guest_internal.h"
9 10
10 namespace extensions { 11 namespace extensions {
11 12
12 namespace appview = core_api::app_view_guest_internal; 13 namespace appview = core_api::app_view_guest_internal;
13 14
14 AppViewGuestInternalAttachFrameFunction:: 15 AppViewGuestInternalAttachFrameFunction::
15 AppViewGuestInternalAttachFrameFunction() { 16 AppViewGuestInternalAttachFrameFunction() {
16 } 17 }
17 18
18 bool AppViewGuestInternalAttachFrameFunction::RunAsync() { 19 bool AppViewGuestInternalAttachFrameFunction::RunAsync() {
19 scoped_ptr<appview::AttachFrame::Params> params( 20 scoped_ptr<appview::AttachFrame::Params> params(
20 appview::AttachFrame::Params::Create(*args_)); 21 appview::AttachFrame::Params::Create(*args_));
21 EXTENSION_FUNCTION_VALIDATE(params.get()); 22 EXTENSION_FUNCTION_VALIDATE(params.get());
22 23
23 GURL url = extension()->GetResourceURL(params->url); 24 GURL url = extension()->GetResourceURL(params->url);
24 EXTENSION_FUNCTION_VALIDATE(url.is_valid()); 25 EXTENSION_FUNCTION_VALIDATE(url.is_valid());
25 26
26 return AppViewGuest::CompletePendingRequest( 27 return AppViewGuest::CompletePendingRequest(
27 browser_context(), url, params->guest_instance_id, extension_id()); 28 browser_context(), url, params->guest_instance_id, extension_id(),
29 render_frame_host()->GetProcess());
28 } 30 }
29 31
30 AppViewGuestInternalDenyRequestFunction:: 32 AppViewGuestInternalDenyRequestFunction::
31 AppViewGuestInternalDenyRequestFunction() { 33 AppViewGuestInternalDenyRequestFunction() {
32 } 34 }
33 35
34 bool AppViewGuestInternalDenyRequestFunction::RunAsync() { 36 bool AppViewGuestInternalDenyRequestFunction::RunAsync() {
35 scoped_ptr<appview::DenyRequest::Params> params( 37 scoped_ptr<appview::DenyRequest::Params> params(
36 appview::DenyRequest::Params::Create(*args_)); 38 appview::DenyRequest::Params::Create(*args_));
37 EXTENSION_FUNCTION_VALIDATE(params.get()); 39 EXTENSION_FUNCTION_VALIDATE(params.get());
38 40
39 // Since the URL passed into AppViewGuest:::CompletePendingRequest is invalid, 41 // Since the URL passed into AppViewGuest:::CompletePendingRequest is invalid,
40 // a new <appview> WebContents will not be created. 42 // a new <appview> WebContents will not be created.
41 return AppViewGuest::CompletePendingRequest( 43 return AppViewGuest::CompletePendingRequest(
42 browser_context(), GURL(), params->guest_instance_id, extension_id()); 44 browser_context(), GURL(), params->guest_instance_id, extension_id(),
45 render_frame_host()->GetProcess());
43 } 46 }
44 47
45 } // namespace extensions 48 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/test/data/extensions/platform_apps/app_view/host_app/window.js ('k') | extensions/browser/bad_message.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698