| 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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 75 } | 75 } |
| 76 | 76 |
| 77 MimeHandlerViewGuest::MimeHandlerViewGuest(WebContents* owner_web_contents) | 77 MimeHandlerViewGuest::MimeHandlerViewGuest(WebContents* owner_web_contents) |
| 78 : GuestView<MimeHandlerViewGuest>(owner_web_contents), | 78 : GuestView<MimeHandlerViewGuest>(owner_web_contents), |
| 79 delegate_(ExtensionsAPIClient::Get()->CreateMimeHandlerViewGuestDelegate( | 79 delegate_(ExtensionsAPIClient::Get()->CreateMimeHandlerViewGuestDelegate( |
| 80 this)) {} | 80 this)) {} |
| 81 | 81 |
| 82 MimeHandlerViewGuest::~MimeHandlerViewGuest() { | 82 MimeHandlerViewGuest::~MimeHandlerViewGuest() { |
| 83 } | 83 } |
| 84 | 84 |
| 85 bool MimeHandlerViewGuest::IsMimeHandlerViewGuest() { |
| 86 return true; |
| 87 } |
| 88 |
| 85 const char* MimeHandlerViewGuest::GetAPINamespace() const { | 89 const char* MimeHandlerViewGuest::GetAPINamespace() const { |
| 86 return "mimeHandlerViewGuestInternal"; | 90 return "mimeHandlerViewGuestInternal"; |
| 87 } | 91 } |
| 88 | 92 |
| 89 int MimeHandlerViewGuest::GetTaskPrefix() const { | 93 int MimeHandlerViewGuest::GetTaskPrefix() const { |
| 90 return IDS_EXTENSION_TASK_MANAGER_MIMEHANDLERVIEW_TAG_PREFIX; | 94 return IDS_EXTENSION_TASK_MANAGER_MIMEHANDLERVIEW_TAG_PREFIX; |
| 91 } | 95 } |
| 92 | 96 |
| 93 void MimeHandlerViewGuest::CreateWebContents( | 97 void MimeHandlerViewGuest::CreateWebContents( |
| 94 const base::DictionaryValue& create_params, | 98 const base::DictionaryValue& create_params, |
| (...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 236 element_instance_id())); | 240 element_instance_id())); |
| 237 } | 241 } |
| 238 | 242 |
| 239 base::WeakPtr<StreamContainer> MimeHandlerViewGuest::GetStream() const { | 243 base::WeakPtr<StreamContainer> MimeHandlerViewGuest::GetStream() const { |
| 240 if (!stream_) | 244 if (!stream_) |
| 241 return base::WeakPtr<StreamContainer>(); | 245 return base::WeakPtr<StreamContainer>(); |
| 242 return stream_->GetWeakPtr(); | 246 return stream_->GetWeakPtr(); |
| 243 } | 247 } |
| 244 | 248 |
| 245 } // namespace extensions | 249 } // namespace extensions |
| OLD | NEW |