Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef CONTENT_BROWSER_INTENTS_INTENTS_HOST_IMPL_H_ | |
| 6 #define CONTENT_BROWSER_INTENTS_INTENTS_HOST_IMPL_H_ | |
| 7 | |
| 8 #include "base/callback.h" | |
| 9 #include "content/browser/tab_contents/tab_contents_observer.h" | |
| 10 #include "content/public/browser/intents_host.h" | |
| 11 #include "webkit/glue/web_intent_data.h" | |
| 12 | |
| 13 class IntentInjector; | |
| 14 | |
| 15 class IntentsHostImpl : public content::IntentsHost, | |
|
James Hawkins
2011/11/29 02:57:55
Document the class.
Greg Billock
2011/11/29 19:18:16
Done.
| |
| 16 public TabContentsObserver { | |
| 17 public: | |
| 18 IntentsHostImpl(TabContents* source_tab, | |
|
James Hawkins
2011/11/29 02:57:55
Document the params.
Greg Billock
2011/11/29 19:18:16
Done.
| |
| 19 const webkit_glue::WebIntentData& intent, | |
| 20 int intent_id); | |
| 21 virtual ~IntentsHostImpl(); | |
| 22 | |
| 23 // Implement IntentsHost | |
|
James Hawkins
2011/11/29 02:57:55
// IntentsHost implementation.
Greg Billock
2011/11/29 19:18:16
Done.
| |
| 24 virtual const webkit_glue::WebIntentData& GetIntent() OVERRIDE; | |
| 25 virtual void DispatchIntent(TabContents* tab_contents) OVERRIDE; | |
| 26 virtual void SendReplyMessage(webkit_glue::WebIntentReplyType reply_type, | |
| 27 const string16& data) OVERRIDE; | |
| 28 virtual void RegisterReplyNotification(const base::Closure& closure) OVERRIDE; | |
|
James Hawkins
2011/11/29 02:57:55
#include "base/compiler_specific.h"
Greg Billock
2011/11/29 19:18:16
Done.
| |
| 29 | |
| 30 // Implement TabContentsObserver | |
| 31 virtual void TabContentsDestroyed(TabContents* tab) OVERRIDE; | |
| 32 | |
| 33 private: | |
| 34 // The intent data. | |
|
James Hawkins
2011/11/29 02:57:55
Redundant comment; either spruce up or remove.
Greg Billock
2011/11/29 19:18:16
Done.
| |
| 35 webkit_glue::WebIntentData intent_; | |
| 36 | |
| 37 // The intent ID. | |
|
James Hawkins
2011/11/29 02:57:55
Same as above.
Greg Billock
2011/11/29 19:18:16
Done.
| |
| 38 int intent_id_; | |
| 39 | |
| 40 // Weak pointer to the internal object which provides the intent to the | |
| 41 // newly-created service tab contents. This object is self-deleting | |
| 42 // (connected to the service TabContents). | |
| 43 IntentInjector* intent_injector_; | |
| 44 | |
| 45 // A callback to be notified when SendReplyMessage is called. | |
| 46 base::Closure reply_notifier_; | |
| 47 | |
| 48 DISALLOW_COPY_AND_ASSIGN(IntentsHostImpl); | |
| 49 }; | |
| 50 | |
| 51 #endif // CONTENT_BROWSER_INTENTS_INTENTS_HOST_IMPL_H_ | |
| OLD | NEW |