| Index: content/browser/intents/intents_host_impl.h
|
| diff --git a/content/browser/intents/intents_host_impl.h b/content/browser/intents/intents_host_impl.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..945b189cfe240a52765e484c2d181c478f89319a
|
| --- /dev/null
|
| +++ b/content/browser/intents/intents_host_impl.h
|
| @@ -0,0 +1,54 @@
|
| +// Copyright (c) 2011 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#ifndef CONTENT_BROWSER_INTENTS_INTENTS_HOST_IMPL_H_
|
| +#define CONTENT_BROWSER_INTENTS_INTENTS_HOST_IMPL_H_
|
| +
|
| +#include "base/callback.h"
|
| +#include "content/browser/tab_contents/tab_contents_observer.h"
|
| +#include "content/public/browser/intents_host.h"
|
| +#include "webkit/glue/web_intent_data.h"
|
| +
|
| +class IntentInjector;
|
| +
|
| +class IntentsHostImpl : public content::IntentsHost,
|
| + public TabContentsObserver {
|
| + public:
|
| + IntentsHostImpl(TabContents* source_tab,
|
| + const webkit_glue::WebIntentData& intent,
|
| + int intent_id);
|
| + virtual ~IntentsHostImpl();
|
| +
|
| + // Implement IntentsHost
|
| + virtual const webkit_glue::WebIntentData& GetIntent() OVERRIDE;
|
| + virtual void DispatchIntent(TabContents* tab_contents) OVERRIDE;
|
| + virtual void SendReplyMessage(webkit_glue::WebIntentReplyType reply_type,
|
| + const string16& data) OVERRIDE;
|
| + virtual void RegisterReplyNotification(const base::Closure& closure) OVERRIDE;
|
| +
|
| + // Implement TabContentsObserver
|
| + virtual void TabContentsDestroyed(TabContents* tab) OVERRIDE;
|
| +
|
| + private:
|
| + // Weak pointer to the tab invoking the intent.
|
| + TabContents* source_tab_;
|
| +
|
| + // The intent data.
|
| + webkit_glue::WebIntentData intent_;
|
| +
|
| + // The intent ID.
|
| + int intent_id_;
|
| +
|
| + // Weak pointer to the internal object which provides the intent to the
|
| + // newly-created service tab contents. This object is self-deleting
|
| + // (connected to the service TabContents).
|
| + IntentInjector* intent_injector_;
|
| +
|
| + // A callback to be notified when SendReplyMessage is called.
|
| + base::Closure reply_notifier_;
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(IntentsHostImpl);
|
| +};
|
| +
|
| +#endif // CONTENT_BROWSER_INTENTS_INTENTS_HOST_IMPL_H_
|
|
|