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

Side by Side Diff: win8/metro_driver/metro_dialog_box.h

Issue 10875008: Integrate the Windows 8 code into the Chromium tree. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove conflicting OWNERS file. Created 8 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « win8/metro_driver/file_picker.cc ('k') | win8/metro_driver/metro_dialog_box.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 (c) 2012 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_BROWSER_UI_METRO_DRIVER_METRO_DIALOG_BOX_H_
6 #define CHROME_BROWSER_UI_METRO_DRIVER_METRO_DIALOG_BOX_H_
7
8 #include <windows.ui.popups.h>
9 #include <string>
10
11 #include "base/logging.h"
12 #include "base/memory/ref_counted.h"
13 #include "base/win/metro.h"
14
15 // Provides functionality to display a dialog box
16 class MetroDialogBox : public winui::Popups::IUICommandInvokedHandler {
17 public:
18 struct DialogBoxInfo {
19 string16 title;
20 string16 content;
21 string16 button1_label;
22 string16 button2_label;
23 base::win::MetroDialogButtonPressedHandler button1_handler;
24 base::win::MetroDialogButtonPressedHandler button2_handler;
25 };
26
27 MetroDialogBox();
28 ~MetroDialogBox();
29
30 // Displays the dialog box.
31 void Show(const DialogBoxInfo& dialog_box_info);
32
33 // Dismisses the dialog box.
34 void Dismiss();
35
36 // IUICommandInvokedHandler implementation.
37 // Dummy implementation of IUnknown. This is fine as the lifetime of this
38 // class is tied to the lifetime of the ChromeAppView instance.
39 virtual HRESULT STDMETHODCALLTYPE QueryInterface(REFIID iid, void** object) {
40 DVLOG(1) << __FUNCTION__;
41 CHECK(false);
42 return E_NOINTERFACE;
43 }
44
45 virtual ULONG STDMETHODCALLTYPE AddRef(void) {
46 DVLOG(1) << __FUNCTION__;
47 return 1;
48 }
49
50 virtual ULONG STDMETHODCALLTYPE Release(void) {
51 DVLOG(1) << __FUNCTION__;
52 return 1;
53 }
54
55 virtual HRESULT STDMETHODCALLTYPE Invoke(winui::Popups::IUICommand* command);
56
57 private:
58 // The actual dialog box.
59 mswr::ComPtr<winui::Popups::IMessageDialog> dialog_box_;
60 DialogBoxInfo dialog_box_info_;
61 };
62
63 #endif // CHROME_BROWSER_UI_METRO_DRIVER_METRO_DIALOG_BOX_H_
64
OLDNEW
« no previous file with comments | « win8/metro_driver/file_picker.cc ('k') | win8/metro_driver/metro_dialog_box.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698