| 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/mime_handler_view/mime_handler_view_gues
t.h" | 5 #include "extensions/browser/guest_view/mime_handler_view/mime_handler_view_gues
t.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/strings/stringprintf.h" | 9 #include "base/strings/stringprintf.h" |
| 10 #include "components/guest_view/common/guest_view_constants.h" | 10 #include "components/guest_view/common/guest_view_constants.h" |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 120 content::RenderFrameHost::FromID(process_id, routing_id); | 120 content::RenderFrameHost::FromID(process_id, routing_id); |
| 121 | 121 |
| 122 if (rfh && rfh->GetView()) { | 122 if (rfh && rfh->GetView()) { |
| 123 embedder_widget_routing_id_ = | 123 embedder_widget_routing_id_ = |
| 124 rfh->GetView()->GetRenderWidgetHost()->GetRoutingID(); | 124 rfh->GetView()->GetRenderWidgetHost()->GetRoutingID(); |
| 125 } | 125 } |
| 126 | 126 |
| 127 DCHECK_NE(MSG_ROUTING_NONE, embedder_widget_routing_id_); | 127 DCHECK_NE(MSG_ROUTING_NONE, embedder_widget_routing_id_); |
| 128 } | 128 } |
| 129 | 129 |
| 130 void MimeHandlerViewGuest::DidAttachToOuterFrame() { |
| 131 DidAttachToEmbedder(); |
| 132 } |
| 133 |
| 130 const char* MimeHandlerViewGuest::GetAPINamespace() const { | 134 const char* MimeHandlerViewGuest::GetAPINamespace() const { |
| 131 return "mimeHandlerViewGuestInternal"; | 135 return "mimeHandlerViewGuestInternal"; |
| 132 } | 136 } |
| 133 | 137 |
| 134 int MimeHandlerViewGuest::GetTaskPrefix() const { | 138 int MimeHandlerViewGuest::GetTaskPrefix() const { |
| 135 return IDS_EXTENSION_TASK_MANAGER_MIMEHANDLERVIEW_TAG_PREFIX; | 139 return IDS_EXTENSION_TASK_MANAGER_MIMEHANDLERVIEW_TAG_PREFIX; |
| 136 } | 140 } |
| 137 | 141 |
| 138 void MimeHandlerViewGuest::CreateWebContents( | 142 void MimeHandlerViewGuest::CreateWebContents( |
| 139 const base::DictionaryValue& create_params, | 143 const base::DictionaryValue& create_params, |
| (...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 301 } | 305 } |
| 302 } | 306 } |
| 303 | 307 |
| 304 base::WeakPtr<StreamContainer> MimeHandlerViewGuest::GetStream() const { | 308 base::WeakPtr<StreamContainer> MimeHandlerViewGuest::GetStream() const { |
| 305 if (!stream_) | 309 if (!stream_) |
| 306 return base::WeakPtr<StreamContainer>(); | 310 return base::WeakPtr<StreamContainer>(); |
| 307 return stream_->GetWeakPtr(); | 311 return stream_->GetWeakPtr(); |
| 308 } | 312 } |
| 309 | 313 |
| 310 } // namespace extensions | 314 } // namespace extensions |
| OLD | NEW |