summaryrefslogtreecommitdiffstats
path: root/chrome/browser/automation/chrome_frame_automation_provider.h
blob: fad6bd84e7372886030d2d0f0172fdc2ea4da4bd (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
// Copyright (c) 2010 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.

// This implements a browser-side endpoint for ChromeFrame UI automation
// activity. The client-side endpoint is implemented by
// ChromeFrameAutomationClient.
// The entire lifetime of this object should be contained within that of
// the BrowserProcess

#ifndef CHROME_BROWSER_AUTOMATION_CHROME_FRAME_AUTOMATION_PROVIDER_H_
#define CHROME_BROWSER_AUTOMATION_CHROME_FRAME_AUTOMATION_PROVIDER_H_
#pragma once

#include "base/basictypes.h"
#include "chrome/browser/automation/automation_provider.h"

class Profile;

// This class services automation IPC requests coming in from ChromeFrame
// instances.
class ChromeFrameAutomationProvider : public AutomationProvider {
 public:
  explicit ChromeFrameAutomationProvider(Profile* profile);

  // IPC::Channel::Listener overrides.
  virtual void OnMessageReceived(const IPC::Message& message);

 protected:
  // This function is called when we receive an invalid message type.
  virtual void OnUnhandledMessage(const IPC::Message& message);

  // Returns true if the message received is a valid chrome frame message.
  bool IsValidMessage(uint32 type);

 private:
  DISALLOW_COPY_AND_ASSIGN(ChromeFrameAutomationProvider);
};

#endif  // CHROME_BROWSER_AUTOMATION_CHROME_FRAME_AUTOMATION_PROVIDER_H_