| 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/surface_worker/surface_worker_guest.h" | 5 #include "extensions/browser/guest_view/surface_worker/surface_worker_guest.h" |
| 6 | 6 |
| 7 #include "components/guest_view/browser/guest_view_manager.h" |
| 7 #include "content/public/common/url_constants.h" | 8 #include "content/public/common/url_constants.h" |
| 8 #include "extensions/browser/guest_view/guest_view_manager.h" | |
| 9 #include "extensions/browser/guest_view/surface_worker/surface_worker_constants.
h" | 9 #include "extensions/browser/guest_view/surface_worker/surface_worker_constants.
h" |
| 10 #include "extensions/strings/grit/extensions_strings.h" | 10 #include "extensions/strings/grit/extensions_strings.h" |
| 11 #include "ipc/ipc_message_macros.h" | 11 #include "ipc/ipc_message_macros.h" |
| 12 | 12 |
| 13 using content::RenderFrameHost; | 13 using content::RenderFrameHost; |
| 14 using content::WebContents; | 14 using content::WebContents; |
| 15 using guestview::GuestViewBase; |
| 16 using guestview::GuestViewManager; |
| 15 | 17 |
| 16 namespace extensions { | 18 namespace extensions { |
| 17 | 19 |
| 18 // static. | 20 // static. |
| 19 const char SurfaceWorkerGuest::Type[] = "surfaceview"; | 21 const char SurfaceWorkerGuest::Type[] = "surfaceview"; |
| 20 | 22 |
| 21 // static | 23 // static |
| 22 GuestViewBase* SurfaceWorkerGuest::Create( | 24 GuestViewBase* SurfaceWorkerGuest::Create( |
| 23 content::WebContents* owner_web_contents) { | 25 content::WebContents* owner_web_contents) { |
| 24 return new SurfaceWorkerGuest(owner_web_contents); | 26 return new SurfaceWorkerGuest(owner_web_contents); |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 callback.Run(WebContents::Create(params)); | 78 callback.Run(WebContents::Create(params)); |
| 77 } | 79 } |
| 78 | 80 |
| 79 void SurfaceWorkerGuest::DidAttachToEmbedder() { | 81 void SurfaceWorkerGuest::DidAttachToEmbedder() { |
| 80 web_contents()->GetController().LoadURL( | 82 web_contents()->GetController().LoadURL( |
| 81 url_, content::Referrer(), ui::PAGE_TRANSITION_LINK, std::string()); | 83 url_, content::Referrer(), ui::PAGE_TRANSITION_LINK, std::string()); |
| 82 url_ = GURL(); | 84 url_ = GURL(); |
| 83 } | 85 } |
| 84 | 86 |
| 85 } // namespace extensions | 87 } // namespace extensions |
| OLD | NEW |