Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(126)

Side by Side Diff: chrome_frame/ready_prompt.h

Issue 4766003: Preview CL for adding an Infobar facility to Google Chrome Frame.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 10 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CHROME_FRAME_READY_PROMPT_H_
6 #define CHROME_FRAME_READY_PROMPT_H_
7
8 #include "chrome_frame/infobar_window.h"
9
10 class ReadyPromptContent
11 : public InfobarContent,
12 public CDialogImpl<ReadyPromptContent, CWindow>,
13 public CDialogResize<ReadyPromptContent> {
14 public:
15 enum { IDD = IDD_FORMVIEW };
16
17 virtual HRESULT InstallInFrame(ContentFrame* frame);
18 virtual void Reset();
19 virtual void OnShow();
20 virtual void OnHide();
21 virtual void SetDimensions(const RECT& dimensions);
22
23 BEGIN_DLGRESIZE_MAP(InfobarWindow)
24 DLGRESIZE_CONTROL(IDC_BUTTON1, DLSZ_CENTER_Y | DLSZ_MOVE_X)
25 DLGRESIZE_CONTROL(IDC_BUTTON2, DLSZ_CENTER_Y | DLSZ_MOVE_X)
26 DLGRESIZE_CONTROL(IDC_BUTTON3, DLSZ_CENTER_Y | DLSZ_MOVE_X)
27 DLGRESIZE_CONTROL(IDC_STATIC1, DLSZ_SIZE_Y | DLSZ_SIZE_X)
28 END_DLGRESIZE_MAP()
29
30 BEGIN_MSG_MAP(InfobarWindow)
31 MESSAGE_HANDLER(WM_INITDIALOG, OnInitDialog)
32 COMMAND_HANDLER(IDC_BUTTON1, BN_CLICKED, OnYes)
33 COMMAND_HANDLER(IDC_BUTTON2, BN_CLICKED, OnRemindMeLater)
34 COMMAND_HANDLER(IDC_BUTTON3, BN_CLICKED, OnNo)
35 CHAIN_MSG_MAP(CDialogResize<ReadyPromptContent>)
36 END_MSG_MAP()
37
38 virtual void OnFinalMessage(HWND);
39
40 ReadyPromptContent();
41 ~ReadyPromptContent() {};
42
43 private:
44 // Event handlers.
45 LRESULT OnInitDialog(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
46
47 // Not owned by this instance
48 ContentFrame* frame_;
49
50 DISALLOW_COPY_AND_ASSIGN(ReadyPromptContent);
51
52 LRESULT OnYes(WORD /*wNotifyCode*/,
53 WORD /*wID*/,
54 HWND /*hWndCtl*/,
55 BOOL& /*bHandled*/);
56 LRESULT OnRemindMeLater(WORD /*wNotifyCode*/,
57 WORD /*wID*/, HWND /*hWndCtl*/, BOOL& /*bHandled*/);
58 LRESULT OnNo(WORD /*wNotifyCode*/,
59 WORD /*wID*/,
60 HWND /*hWndCtl*/,
61 BOOL& /*bHandled*/);
62 };
63
64 #endif // CHROME_FRAME_READY_PROMPT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698