OLD | NEW |
| (Empty) |
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. | |
4 | |
5 #ifndef CHROME_FRAME_READY_MODE_INTERNAL_READY_PROMPT_CONTENT_H_ | |
6 #define CHROME_FRAME_READY_MODE_INTERNAL_READY_PROMPT_CONTENT_H_ | |
7 | |
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" | |
12 | |
13 class ReadyModeState; | |
14 class ReadyPromptWindow; | |
15 class UrlLauncher; | |
16 | |
17 // Encapsulates the Ready Mode prompt inviting users to permanently activate | |
18 // Chrome Frame, temporarily disable Ready Mode, or permanently disable Ready | |
19 // Mode. | |
20 class ReadyPromptContent : public InfobarContent { | |
21 public: | |
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(); | |
27 | |
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); | |
32 | |
33 private: | |
34 base::WeakPtr<ReadyPromptWindow> window_; | |
35 scoped_ptr<ReadyModeState> ready_mode_state_; | |
36 scoped_ptr<UrlLauncher> url_launcher_; | |
37 | |
38 DISALLOW_COPY_AND_ASSIGN(ReadyPromptContent); | |
39 }; // class ReadyPromptContent | |
40 | |
41 #endif // CHROME_FRAME_READY_MODE_INTERNAL_READY_PROMPT_CONTENT_H_ | |
OLD | NEW |