1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef CHROME_FRAME_READY_MODE_INTERNAL_READY_PROMPT_CONTENT_H_
6 #define CHROME_FRAME_READY_MODE_INTERNAL_READY_PROMPT_CONTENT_H_
8 #include "base/basictypes.h"
9 #include "base/memory/scoped_ptr.h"
10 #include "base/memory/weak_ptr.h"
11 #include "chrome_frame/infobars/infobar_content.h"
14 class ReadyPromptWindow;
17 // Encapsulates the Ready Mode prompt inviting users to permanently activate
18 // Chrome Frame, temporarily disable Ready Mode, or permanently disable Ready
20 class ReadyPromptContent : public InfobarContent {
22 // Takes ownership of the ReadyModeState and UrlLauncher instances, which
23 // will be freed upon destruction of the ReadyPromptContent.
24 ReadyPromptContent(ReadyModeState* ready_mode_state,
25 UrlLauncher* url_launcher);
26 virtual ~ReadyPromptContent();
28 // InfobarContent implementation
29 virtual bool InstallInFrame(Frame* frame);
30 virtual void SetDimensions(const RECT& dimensions);
31 virtual size_t GetDesiredSize(size_t width, size_t height);
34 base::WeakPtr<ReadyPromptWindow> window_;
35 scoped_ptr<ReadyModeState> ready_mode_state_;
36 scoped_ptr<UrlLauncher> url_launcher_;
38 DISALLOW_COPY_AND_ASSIGN(ReadyPromptContent);
39 }; // class ReadyPromptContent
41 #endif // CHROME_FRAME_READY_MODE_INTERNAL_READY_PROMPT_CONTENT_H_