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

Unified 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 side-by-side diff with in-line comments
Download patch
Index: chrome_frame/ready_prompt.h
===================================================================
--- chrome_frame/ready_prompt.h (revision 0)
+++ chrome_frame/ready_prompt.h (revision 0)
@@ -0,0 +1,64 @@
+// Copyright (c) 2010 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_PROMPT_H_
+#define CHROME_FRAME_READY_PROMPT_H_
+
+#include "chrome_frame/infobar_window.h"
+
+class ReadyPromptContent
+ : public InfobarContent,
+ public CDialogImpl<ReadyPromptContent, CWindow>,
+ public CDialogResize<ReadyPromptContent> {
+ public:
+ enum { IDD = IDD_FORMVIEW };
+
+ virtual HRESULT InstallInFrame(ContentFrame* frame);
+ virtual void Reset();
+ virtual void OnShow();
+ virtual void OnHide();
+ virtual void SetDimensions(const RECT& dimensions);
+
+ BEGIN_DLGRESIZE_MAP(InfobarWindow)
+ DLGRESIZE_CONTROL(IDC_BUTTON1, DLSZ_CENTER_Y | DLSZ_MOVE_X)
+ DLGRESIZE_CONTROL(IDC_BUTTON2, DLSZ_CENTER_Y | DLSZ_MOVE_X)
+ DLGRESIZE_CONTROL(IDC_BUTTON3, DLSZ_CENTER_Y | DLSZ_MOVE_X)
+ DLGRESIZE_CONTROL(IDC_STATIC1, DLSZ_SIZE_Y | DLSZ_SIZE_X)
+ END_DLGRESIZE_MAP()
+
+ BEGIN_MSG_MAP(InfobarWindow)
+ MESSAGE_HANDLER(WM_INITDIALOG, OnInitDialog)
+ COMMAND_HANDLER(IDC_BUTTON1, BN_CLICKED, OnYes)
+ COMMAND_HANDLER(IDC_BUTTON2, BN_CLICKED, OnRemindMeLater)
+ COMMAND_HANDLER(IDC_BUTTON3, BN_CLICKED, OnNo)
+ CHAIN_MSG_MAP(CDialogResize<ReadyPromptContent>)
+ END_MSG_MAP()
+
+ virtual void OnFinalMessage(HWND);
+
+ ReadyPromptContent();
+ ~ReadyPromptContent() {};
+
+ private:
+ // Event handlers.
+ LRESULT OnInitDialog(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
+
+ // Not owned by this instance
+ ContentFrame* frame_;
+
+ DISALLOW_COPY_AND_ASSIGN(ReadyPromptContent);
+
+ LRESULT OnYes(WORD /*wNotifyCode*/,
+ WORD /*wID*/,
+ HWND /*hWndCtl*/,
+ BOOL& /*bHandled*/);
+ LRESULT OnRemindMeLater(WORD /*wNotifyCode*/,
+ WORD /*wID*/, HWND /*hWndCtl*/, BOOL& /*bHandled*/);
+ LRESULT OnNo(WORD /*wNotifyCode*/,
+ WORD /*wID*/,
+ HWND /*hWndCtl*/,
+ BOOL& /*bHandled*/);
+};
+
+#endif // CHROME_FRAME_READY_PROMPT_H_

Powered by Google App Engine
This is Rietveld 408576698