#ifndef APPS_SHELL_BROWSER_SHELL_APP_WINDOW_H_
#define APPS_SHELL_BROWSER_SHELL_APP_WINDOW_H_
#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
#include "content/public/browser/web_contents_observer.h"
#include "extensions/browser/extension_function_dispatcher.h"
struct ExtensionHostMsg_Request_Params;
class GURL;
namespace aura {
class Window;
}
namespace content {
class BrowserContext;
class WebContents;
}
namespace extensions {
class ExtensionFunctionDispatcher;
}
namespace gfx {
class Size;
}
namespace apps {
class ShellAppWindow
: public content::WebContentsObserver,
public extensions::ExtensionFunctionDispatcher::Delegate {
public:
ShellAppWindow();
virtual ~ShellAppWindow();
void Init(content::BrowserContext* context, gfx::Size initial_size);
void LoadURL(const GURL& url);
aura::Window* GetNativeWindow();
int GetRenderViewRoutingID();
virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
virtual content::WebContents* GetAssociatedWebContents() const OVERRIDE;
private:
void OnRequest(const ExtensionHostMsg_Request_Params& params);
scoped_ptr<content::WebContents> web_contents_;
scoped_ptr<extensions::ExtensionFunctionDispatcher>
extension_function_dispatcher_;
DISALLOW_COPY_AND_ASSIGN(ShellAppWindow);
};
}
#endif