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/guest_view/guest_view_base.h" | 5 #include "extensions/browser/guest_view/guest_view_base.h" |
6 | 6 |
7 #include "base/lazy_instance.h" | 7 #include "base/lazy_instance.h" |
8 #include "base/strings/utf_string_conversions.h" | 8 #include "base/strings/utf_string_conversions.h" |
9 #include "content/public/browser/render_frame_host.h" | 9 #include "content/public/browser/render_frame_host.h" |
10 #include "content/public/browser/render_process_host.h" | 10 #include "content/public/browser/render_process_host.h" |
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
286 return false; | 286 return false; |
287 } | 287 } |
288 | 288 |
289 void GuestViewBase::DidAttach(int guest_proxy_routing_id) { | 289 void GuestViewBase::DidAttach(int guest_proxy_routing_id) { |
290 // Give the derived class an opportunity to perform some actions. | 290 // Give the derived class an opportunity to perform some actions. |
291 DidAttachToEmbedder(); | 291 DidAttachToEmbedder(); |
292 | 292 |
293 // Inform the associated GuestViewContainer that the contentWindow is ready. | 293 // Inform the associated GuestViewContainer that the contentWindow is ready. |
294 embedder_web_contents()->Send(new ExtensionMsg_GuestAttached( | 294 embedder_web_contents()->Send(new ExtensionMsg_GuestAttached( |
295 embedder_web_contents()->GetMainFrame()->GetRoutingID(), | 295 embedder_web_contents()->GetMainFrame()->GetRoutingID(), |
296 element_instance_id_, | |
297 guest_proxy_routing_id)); | 296 guest_proxy_routing_id)); |
298 | 297 |
299 SendQueuedEvents(); | 298 SendQueuedEvents(); |
300 } | 299 } |
301 | 300 |
302 void GuestViewBase::ElementSizeChanged(const gfx::Size& old_size, | 301 void GuestViewBase::ElementSizeChanged(const gfx::Size& old_size, |
303 const gfx::Size& new_size) { | 302 const gfx::Size& new_size) { |
304 element_size_ = new_size; | 303 element_size_ = new_size; |
305 } | 304 } |
306 | 305 |
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
494 | 493 |
495 // static | 494 // static |
496 void GuestViewBase::RegisterGuestViewTypes() { | 495 void GuestViewBase::RegisterGuestViewTypes() { |
497 AppViewGuest::Register(); | 496 AppViewGuest::Register(); |
498 ExtensionOptionsGuest::Register(); | 497 ExtensionOptionsGuest::Register(); |
499 MimeHandlerViewGuest::Register(); | 498 MimeHandlerViewGuest::Register(); |
500 WebViewGuest::Register(); | 499 WebViewGuest::Register(); |
501 } | 500 } |
502 | 501 |
503 } // namespace extensions | 502 } // namespace extensions |
OLD | NEW |