diff options
author | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-12-10 21:55:08 +0000 |
---|---|---|
committer | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-12-10 21:55:08 +0000 |
commit | e253b2610361d3036d85dbea58f8bef2d1d8e261 (patch) | |
tree | 4dab2a4bbb1622dc07b2c862d6b5aba56dc83965 /chrome/browser/automation/chrome_frame_automation_provider.h | |
parent | 4a665eedf71acddba1bc1f74be11340abdba185f (diff) | |
download | chromium_src-e253b2610361d3036d85dbea58f8bef2d1d8e261.zip chromium_src-e253b2610361d3036d85dbea58f8bef2d1d8e261.tar.gz chromium_src-e253b2610361d3036d85dbea58f8bef2d1d8e261.tar.bz2 |
ChromeFrame uses the IPC automation channel to talk to Chrome. The IPC messages sent by ChromeFrame
are handled by the AutomationProvider class in Chrome, which also handles other IPC's not used by
ChromeFrame.
We now have a new class ChromeFrameAutomationProvider which derives from the AutomationProvider
class and validates that incoming IPC messages are valid ChromeFrame messages.
Bug=29931
Test=Covered by unit test
Review URL: http://codereview.chromium.org/476008
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@34290 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/automation/chrome_frame_automation_provider.h')
-rw-r--r-- | chrome/browser/automation/chrome_frame_automation_provider.h | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/chrome/browser/automation/chrome_frame_automation_provider.h b/chrome/browser/automation/chrome_frame_automation_provider.h new file mode 100644 index 0000000..0ab6a8f --- /dev/null +++ b/chrome/browser/automation/chrome_frame_automation_provider.h @@ -0,0 +1,41 @@ +// Copyright (c) 2006-2009 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_ + +#include "base/basictypes.h" +#include "base/scoped_ptr.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_ + |