summaryrefslogtreecommitdiffstats
path: root/chrome/browser/tab_contents/chrome_interstitial_page.h
blob: 8883129208f696e2bfd40259c3b5ea426c45fb32 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
// 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 CHROME_BROWSER_TAB_CONTENTS_CHROME_INTERSTITIAL_PAGE_H_
#define CHROME_BROWSER_TAB_CONTENTS_CHROME_INTERSTITIAL_PAGE_H_
#pragma once

#include <map>
#include <string>

#include "content/browser/tab_contents/interstitial_page.h"
#include "content/public/browser/notification_observer.h"
#include "googleurl/src/gurl.h"

class TabContents;

// This class adds the possibility to react to DOMResponse-messages sent by
// the RenderViewHost via ChromeRenderViewHostObserver to the InterstitialPage.
class ChromeInterstitialPage : public InterstitialPage {
 public:
  ChromeInterstitialPage(TabContents* tab,
                         bool new_navigation,
                         const GURL& url);
  virtual ~ChromeInterstitialPage();

  // Shows the interstitial page in the tab.
  virtual void Show() OVERRIDE;

 protected:
  // content::NotificationObserver method:
  virtual void Observe(int type,
                       const content::NotificationSource& source,
                       const content::NotificationDetails& details) OVERRIDE;

  // Invoked when the page sent a command through DOMAutomation.
  virtual void CommandReceived(const std::string& command) {}

 private:
  DISALLOW_COPY_AND_ASSIGN(ChromeInterstitialPage);
};

#endif  // CHROME_BROWSER_TAB_CONTENTS_CHROME_INTERSTITIAL_PAGE_H_