summaryrefslogtreecommitdiffstats
path: root/chrome/browser/external_protocol/external_protocol_observer.h
blob: e031804e6f7166292f225afee1dde6305cd76668 (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
// 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_EXTERNAL_PROTOCOL_EXTERNAL_PROTOCOL_OBSERVER_H_
#define CHROME_BROWSER_EXTERNAL_PROTOCOL_EXTERNAL_PROTOCOL_OBSERVER_H_

#include "chrome/browser/tab_contents/web_contents_user_data.h"
#include "content/public/browser/web_contents_observer.h"

// ExternalProtocolObserver is responsible for handling messages from
// WebContents relating to external protocols.
class ExternalProtocolObserver
    : public content::WebContentsObserver,
      public WebContentsUserData<ExternalProtocolObserver> {
 public:
  virtual ~ExternalProtocolObserver();

  // content::WebContentsObserver overrides.
  virtual void DidGetUserGesture() OVERRIDE;

 private:
  explicit ExternalProtocolObserver(content::WebContents* web_contents);
  static int kUserDataKey;
  friend class WebContentsUserData<ExternalProtocolObserver>;

  DISALLOW_COPY_AND_ASSIGN(ExternalProtocolObserver);
};

#endif  // CHROME_BROWSER_EXTERNAL_PROTOCOL_EXTERNAL_PROTOCOL_OBSERVER_H_