diff options
Diffstat (limited to 'chrome_frame/ready_mode/ready_mode.h')
-rw-r--r-- | chrome_frame/ready_mode/ready_mode.h | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/chrome_frame/ready_mode/ready_mode.h b/chrome_frame/ready_mode/ready_mode.h new file mode 100644 index 0000000..0d42ab3 --- /dev/null +++ b/chrome_frame/ready_mode/ready_mode.h @@ -0,0 +1,42 @@ +// 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_FRAME_READY_MODE_READY_MODE_H_ +#define CHROME_FRAME_READY_MODE_READY_MODE_H_ +#pragma once + +#include <atlbase.h> +#include <atlcom.h> + +#include "base/basictypes.h" + +interface IWebBrowser2; + +// Integrates Ready Mode functionality with a specified IWebBrowser2 instance. +// Displays prompts allowing the user to permanently activate, permanently +// disable, or temporarily disable Chrome Frame whenever a Chrome Frame-enabled +// site is rendered in the browser. +namespace ready_mode { + +// Defines an interface for disabling Chrome Frame based on user interaction +// with Ready Mode. +class Delegate { + public: + virtual ~Delegate() {} + + // Disables Chrome Frame functionality in the current process. Will be + // called after the installer has been invoked to manipulate the system or + // user-level state. + virtual void DisableChromeFrame() = 0; +}; // class Delegate + +// Enables Ready Mode for the specified IWebBrowser2 instance, if Chrome Frame +// is currently in Ready Mode. If Chrome Frame is temporarily or permanently +// declined, will invoke chrome_frame->DisableChromeFrame() to synchronize the +// process state with the system- / user-level state. +void Configure(Delegate* chrome_frame, IWebBrowser2* web_browser); + +}; // namespace ready_mode + +#endif // CHROME_FRAME_READY_MODE_READY_MODE_H_ |