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/guest_view/guest_view_internal_api.h" | 5 #include "chrome/browser/extensions/api/guest_view/guest_view_internal_api.h" |
6 | 6 |
7 #include "chrome/browser/profiles/profile.h" | 7 #include "chrome/browser/profiles/profile.h" |
8 #include "chrome/common/extensions/api/guest_view_internal.h" | 8 #include "chrome/common/extensions/api/guest_view_internal.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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 *create_params, | 53 *create_params, |
54 callback); | 54 callback); |
55 return true; | 55 return true; |
56 } | 56 } |
57 | 57 |
58 void GuestViewInternalCreateGuestFunction::CreateGuestCallback( | 58 void GuestViewInternalCreateGuestFunction::CreateGuestCallback( |
59 content::WebContents* guest_web_contents) { | 59 content::WebContents* guest_web_contents) { |
60 int guest_instance_id = 0; | 60 int guest_instance_id = 0; |
61 if (guest_web_contents) { | 61 if (guest_web_contents) { |
62 GuestViewBase* guest = GuestViewBase::FromWebContents(guest_web_contents); | 62 GuestViewBase* guest = GuestViewBase::FromWebContents(guest_web_contents); |
63 guest_instance_id = guest->GetGuestInstanceID(); | 63 guest_instance_id = guest->guest_instance_id(); |
64 } | 64 } |
65 SetResult(new base::FundamentalValue(guest_instance_id)); | 65 SetResult(new base::FundamentalValue(guest_instance_id)); |
66 SendResponse(true); | 66 SendResponse(true); |
67 } | 67 } |
68 | 68 |
69 GuestViewInternalSetAutoSizeFunction:: | 69 GuestViewInternalSetAutoSizeFunction:: |
70 GuestViewInternalSetAutoSizeFunction() { | 70 GuestViewInternalSetAutoSizeFunction() { |
71 } | 71 } |
72 | 72 |
73 GuestViewInternalSetAutoSizeFunction:: | 73 GuestViewInternalSetAutoSizeFunction:: |
(...skipping 11 matching lines...) Expand all Loading... |
85 guest->SetAutoSize(params->params.enable_auto_size, | 85 guest->SetAutoSize(params->params.enable_auto_size, |
86 gfx::Size(params->params.min.width, | 86 gfx::Size(params->params.min.width, |
87 params->params.min.height), | 87 params->params.min.height), |
88 gfx::Size(params->params.max.width, | 88 gfx::Size(params->params.max.width, |
89 params->params.max.height)); | 89 params->params.max.height)); |
90 SendResponse(true); | 90 SendResponse(true); |
91 return true; | 91 return true; |
92 } | 92 } |
93 | 93 |
94 } // namespace extensions | 94 } // namespace extensions |
OLD | NEW |