| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // This implements a browser-side endpoint for ChromeFrame UI automation | 5 // This implements a browser-side endpoint for ChromeFrame UI automation |
| 6 // activity. The client-side endpoint is implemented by | 6 // activity. The client-side endpoint is implemented by |
| 7 // ChromeFrameAutomationClient. | 7 // ChromeFrameAutomationClient. |
| 8 // The entire lifetime of this object should be contained within that of | 8 // The entire lifetime of this object should be contained within that of |
| 9 // the BrowserProcess | 9 // the BrowserProcess |
| 10 | 10 |
| 11 #ifndef CHROME_BROWSER_AUTOMATION_CHROME_FRAME_AUTOMATION_PROVIDER_H_ | 11 #ifndef CHROME_BROWSER_AUTOMATION_CHROME_FRAME_AUTOMATION_PROVIDER_H_ |
| 12 #define CHROME_BROWSER_AUTOMATION_CHROME_FRAME_AUTOMATION_PROVIDER_H_ | 12 #define CHROME_BROWSER_AUTOMATION_CHROME_FRAME_AUTOMATION_PROVIDER_H_ |
| 13 #pragma once | 13 #pragma once |
| 14 | 14 |
| 15 #include "base/basictypes.h" | 15 #include "base/basictypes.h" |
| 16 #include "chrome/browser/automation/automation_provider.h" | 16 #include "chrome/browser/automation/automation_provider.h" |
| 17 | 17 |
| 18 class Profile; | 18 class Profile; |
| 19 | 19 |
| 20 // This class services automation IPC requests coming in from ChromeFrame | 20 // This class services automation IPC requests coming in from ChromeFrame |
| 21 // instances. | 21 // instances. |
| 22 class ChromeFrameAutomationProvider : public AutomationProvider { | 22 class ChromeFrameAutomationProvider : public AutomationProvider { |
| 23 public: | 23 public: |
| 24 explicit ChromeFrameAutomationProvider(Profile* profile); | 24 explicit ChromeFrameAutomationProvider(Profile* profile); |
| 25 | 25 |
| 26 // IPC::Channel::Listener overrides. | 26 // IPC::Channel::Listener overrides. |
| 27 virtual void OnMessageReceived(const IPC::Message& message); | 27 virtual bool OnMessageReceived(const IPC::Message& message); |
| 28 | 28 |
| 29 protected: | 29 protected: |
| 30 // This function is called when we receive an invalid message type. | 30 // This function is called when we receive an invalid message type. |
| 31 virtual void OnUnhandledMessage(const IPC::Message& message); | 31 virtual void OnUnhandledMessage(const IPC::Message& message); |
| 32 | 32 |
| 33 // Returns true if the message received is a valid chrome frame message. | 33 // Returns true if the message received is a valid chrome frame message. |
| 34 bool IsValidMessage(uint32 type); | 34 bool IsValidMessage(uint32 type); |
| 35 | 35 |
| 36 private: | 36 private: |
| 37 DISALLOW_COPY_AND_ASSIGN(ChromeFrameAutomationProvider); | 37 DISALLOW_COPY_AND_ASSIGN(ChromeFrameAutomationProvider); |
| 38 }; | 38 }; |
| 39 | 39 |
| 40 #endif // CHROME_BROWSER_AUTOMATION_CHROME_FRAME_AUTOMATION_PROVIDER_H_ | 40 #endif // CHROME_BROWSER_AUTOMATION_CHROME_FRAME_AUTOMATION_PROVIDER_H_ |
| 41 | 41 |
| OLD | NEW |