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/guest_view/guest_view_internal_api.h" | 5 #include "extensions/browser/api/guest_view/guest_view_internal_api.h" |
6 | 6 |
| 7 #include <utility> |
| 8 |
7 #include "components/guest_view/browser/guest_view_base.h" | 9 #include "components/guest_view/browser/guest_view_base.h" |
8 #include "components/guest_view/browser/guest_view_manager.h" | 10 #include "components/guest_view/browser/guest_view_manager.h" |
9 #include "components/guest_view/browser/guest_view_manager_delegate.h" | 11 #include "components/guest_view/browser/guest_view_manager_delegate.h" |
10 #include "components/guest_view/common/guest_view_constants.h" | 12 #include "components/guest_view/common/guest_view_constants.h" |
11 #include "content/public/browser/render_frame_host.h" | 13 #include "content/public/browser/render_frame_host.h" |
12 #include "content/public/browser/render_process_host.h" | 14 #include "content/public/browser/render_process_host.h" |
13 #include "extensions/browser/api/extensions_api_client.h" | 15 #include "extensions/browser/api/extensions_api_client.h" |
14 #include "extensions/common/api/guest_view_internal.h" | 16 #include "extensions/common/api/guest_view_internal.h" |
15 #include "extensions/common/permissions/permissions_data.h" | 17 #include "extensions/common/permissions/permissions_data.h" |
16 | 18 |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 int content_window_id = MSG_ROUTING_NONE; | 72 int content_window_id = MSG_ROUTING_NONE; |
71 if (guest_web_contents) { | 73 if (guest_web_contents) { |
72 GuestViewBase* guest = GuestViewBase::FromWebContents(guest_web_contents); | 74 GuestViewBase* guest = GuestViewBase::FromWebContents(guest_web_contents); |
73 guest_instance_id = guest->guest_instance_id(); | 75 guest_instance_id = guest->guest_instance_id(); |
74 content_window_id = guest->proxy_routing_id(); | 76 content_window_id = guest->proxy_routing_id(); |
75 } | 77 } |
76 std::unique_ptr<base::DictionaryValue> return_params( | 78 std::unique_ptr<base::DictionaryValue> return_params( |
77 new base::DictionaryValue()); | 79 new base::DictionaryValue()); |
78 return_params->SetInteger(guest_view::kID, guest_instance_id); | 80 return_params->SetInteger(guest_view::kID, guest_instance_id); |
79 return_params->SetInteger(guest_view::kContentWindowID, content_window_id); | 81 return_params->SetInteger(guest_view::kContentWindowID, content_window_id); |
80 SetResult(return_params.release()); | 82 SetResult(std::move(return_params)); |
81 SendResponse(true); | 83 SendResponse(true); |
82 } | 84 } |
83 | 85 |
84 GuestViewInternalDestroyGuestFunction:: | 86 GuestViewInternalDestroyGuestFunction:: |
85 GuestViewInternalDestroyGuestFunction() { | 87 GuestViewInternalDestroyGuestFunction() { |
86 } | 88 } |
87 | 89 |
88 GuestViewInternalDestroyGuestFunction:: | 90 GuestViewInternalDestroyGuestFunction:: |
89 ~GuestViewInternalDestroyGuestFunction() { | 91 ~GuestViewInternalDestroyGuestFunction() { |
90 } | 92 } |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
134 set_size_params.normal_size.reset(new gfx::Size( | 136 set_size_params.normal_size.reset(new gfx::Size( |
135 params->params.normal->width, params->params.normal->height)); | 137 params->params.normal->width, params->params.normal->height)); |
136 } | 138 } |
137 | 139 |
138 guest->SetSize(set_size_params); | 140 guest->SetSize(set_size_params); |
139 SendResponse(true); | 141 SendResponse(true); |
140 return true; | 142 return true; |
141 } | 143 } |
142 | 144 |
143 } // namespace extensions | 145 } // namespace extensions |
OLD | NEW |