#ifndef CHROME_BROWSER_ANDROID_META_TAG_OBSERVER_H_
#define CHROME_BROWSER_ANDROID_META_TAG_OBSERVER_H_
#include "content/public/browser/web_contents_observer.h"
class GURL;
class MetaTagObserver : public content::WebContentsObserver {
public:
explicit MetaTagObserver(const std::string& meta_tag);
virtual ~MetaTagObserver();
virtual void DidFinishLoad(
int64 frame_id,
const GURL& validated_url,
bool is_main_frame,
content::RenderViewHost* render_view_host) OVERRIDE;
virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
protected:
virtual void HandleMetaTagContent(const std::string& tag_content,
const GURL& expected_url) = 0;
private:
void OnDidRetrieveMetaTagContent(bool success,
const std::string& tag_name,
const std::string& tag_content,
const GURL& expected_url);
const std::string meta_tag_;
GURL validated_url_;
DISALLOW_COPY_AND_ASSIGN(MetaTagObserver);
};
#endif