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

Side by Side Diff: ui/yes_no_dialog.h

Issue 624713003: Keep only base/extractor.[cc|h]. (Closed) Base URL: https://chromium.googlesource.com/external/omaha.git@master
Patch Set: Created 6 years, 2 months 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
« no previous file with comments | « ui/uilib/static_line.cc ('k') | ui/yes_no_dialog.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2011 Google Inc.
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
6 //
7 // http://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
14 // ========================================================================
15
16 #ifndef OMAHA_UI_YES_NO_DIALOG_H_
17 #define OMAHA_UI_YES_NO_DIALOG_H_
18
19 #include "omaha/base/scoped_any.h"
20 #include "omaha/base/wtl_atlapp_wrapper.h"
21 #include "omaha/client/resource.h"
22
23 namespace omaha {
24
25 class YesNoDialog
26 : public CAxDialogImpl<YesNoDialog>,
27 public CMessageFilter {
28 typedef CAxDialogImpl<YesNoDialog> Base;
29
30 public:
31 static const int IDD = IDD_YES_NO;
32
33 YesNoDialog(CMessageLoop* message_loop, HWND parent);
34 ~YesNoDialog();
35
36 HRESULT Initialize(const CString& yes_no_title,
37 const CString& yes_no_text);
38 HRESULT Show();
39
40 bool yes_clicked() const {
41 return yes_clicked_;
42 }
43
44 // CMessageFilter interface method.
45 BOOL PreTranslateMessage(MSG* msg) {
46 return CWindow::IsDialogMessage(msg);
47 }
48
49 BEGIN_MSG_MAP(YesNoDialog)
50 COMMAND_HANDLER(IDOK, BN_CLICKED, OnClickedButton)
51 COMMAND_ID_HANDLER(IDCANCEL, OnClickedButton)
52 MESSAGE_HANDLER(WM_CLOSE, OnClose)
53 MESSAGE_HANDLER(WM_NCDESTROY, OnNCDestroy)
54 CHAIN_MSG_MAP(Base)
55 END_MSG_MAP()
56
57 private:
58 // Message and command handlers.
59 LRESULT OnClickedButton(WORD notify_code,
60 WORD id,
61 HWND wnd_ctl,
62 BOOL& handled); // NOLINT(runtime/references)
63 LRESULT OnClose(UINT msg,
64 WPARAM wparam,
65 LPARAM lparam,
66 BOOL& handled); // NOLINT(runtime/references)
67 LRESULT OnNCDestroy(UINT msg,
68 WPARAM wparam,
69 LPARAM lparam,
70 BOOL& handled); // NOLINT(runtime/references)
71
72 CMessageLoop* message_loop_;
73 HWND parent_;
74 bool yes_clicked_;
75
76 // Handle to large icon to show when ALT-TAB.
77 scoped_hicon hicon_;
78
79 DISALLOW_COPY_AND_ASSIGN(YesNoDialog);
80 };
81
82 } // namespace omaha
83
84 #endif // OMAHA_UI_YES_NO_DIALOG_H_
85
OLDNEW
« no previous file with comments | « ui/uilib/static_line.cc ('k') | ui/yes_no_dialog.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698