| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "content/browser/intents/web_intents_dispatcher_impl.h" | 5 #include "content/browser/intents/web_intents_dispatcher_impl.h" |
| 6 | 6 |
| 7 #include "content/browser/intents/intent_injector.h" | 7 #include "content/browser/intents/intent_injector.h" |
| 8 #include "content/browser/intents/internal_web_intents_dispatcher.h" | 8 #include "content/browser/intents/internal_web_intents_dispatcher.h" |
| 9 #include "content/browser/web_contents/web_contents_impl.h" | 9 #include "content/browser/web_contents/web_contents_impl.h" |
| 10 #include "content/common/intents_messages.h" | 10 #include "content/common/intents_messages.h" |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 WebIntentsDispatcherImpl::WebIntentsDispatcherImpl( | 21 WebIntentsDispatcherImpl::WebIntentsDispatcherImpl( |
| 22 WebContents* source_contents, | 22 WebContents* source_contents, |
| 23 const webkit_glue::WebIntentData& intent, | 23 const webkit_glue::WebIntentData& intent, |
| 24 int intent_id) | 24 int intent_id) |
| 25 : WebContentsObserver(source_contents), | 25 : WebContentsObserver(source_contents), |
| 26 intent_(intent), | 26 intent_(intent), |
| 27 intent_id_(intent_id), | 27 intent_id_(intent_id), |
| 28 intent_injector_(NULL) { | 28 intent_injector_(NULL) { |
| 29 // Ensure that WebIntentData sent from a renderer process | 29 // Ensure that WebIntentData sent from a renderer process |
| 30 // carries the right payload type and no extraneous data. | 30 // carries the right payload type and no extraneous data. |
| 31 intent_.blob_file = FilePath(); | 31 intent_.blob_file = base::FilePath(); |
| 32 intent_.blob_length = 0; | 32 intent_.blob_length = 0; |
| 33 intent_.root_name = ""; | 33 intent_.root_name = ""; |
| 34 intent_.filesystem_id = ""; | 34 intent_.filesystem_id = ""; |
| 35 intent_.data_type = webkit_glue::WebIntentData::SERIALIZED; | 35 intent_.data_type = webkit_glue::WebIntentData::SERIALIZED; |
| 36 } | 36 } |
| 37 | 37 |
| 38 WebIntentsDispatcherImpl::~WebIntentsDispatcherImpl() {} | 38 WebIntentsDispatcherImpl::~WebIntentsDispatcherImpl() {} |
| 39 | 39 |
| 40 const webkit_glue::WebIntentData& WebIntentsDispatcherImpl::GetIntent() { | 40 const webkit_glue::WebIntentData& WebIntentsDispatcherImpl::GetIntent() { |
| 41 return intent_; | 41 return intent_; |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 } | 81 } |
| 82 | 82 |
| 83 void WebIntentsDispatcherImpl::WebContentsDestroyed(WebContents* contents) { | 83 void WebIntentsDispatcherImpl::WebContentsDestroyed(WebContents* contents) { |
| 84 if (intent_injector_) | 84 if (intent_injector_) |
| 85 intent_injector_->SourceWebContentsDestroyed(contents); | 85 intent_injector_->SourceWebContentsDestroyed(contents); |
| 86 | 86 |
| 87 intent_injector_ = NULL; | 87 intent_injector_ = NULL; |
| 88 } | 88 } |
| 89 | 89 |
| 90 } // namespace content | 90 } // namespace content |
| OLD | NEW |