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

Side by Side Diff: chrome/browser/input_window_dialog.h

Issue 5582002: Move:... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 10 years 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 | « chrome/browser/history/redirect_uitest.cc ('k') | chrome/browser/input_window_dialog_gtk.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) 2009 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_INPUT_WINDOW_DIALOG_H_
6 #define CHROME_BROWSER_INPUT_WINDOW_DIALOG_H_
7 #pragma once
8
9 #include <string>
10
11 #include "base/basictypes.h"
12 #include "gfx/native_widget_types.h"
13
14 // Cross platform access to a modal input window.
15 class InputWindowDialog {
16 public:
17 class Delegate {
18 public:
19 virtual ~Delegate() {}
20
21 // Checks whether |text| is a valid input string.
22 virtual bool IsValid(const std::wstring& text) = 0;
23
24 // Callback for when the user clicks the OK button.
25 virtual void InputAccepted(const std::wstring& text) = 0;
26
27 // Callback for when the user clicks the Cancel button.
28 virtual void InputCanceled() = 0;
29 };
30
31 // Creates a new input window dialog parented to |parent|. Ownership of
32 // |delegate| is taken by InputWindowDialog or InputWindowDialog's owner.
33 static InputWindowDialog* Create(gfx::NativeWindow parent,
34 const std::wstring& window_title,
35 const std::wstring& label,
36 const std::wstring& contents,
37 Delegate* delegate);
38
39 // Displays the window.
40 virtual void Show() = 0;
41
42 // Closes the window.
43 virtual void Close() = 0;
44
45 protected:
46 InputWindowDialog() {}
47 virtual ~InputWindowDialog() {}
48
49 private:
50 DISALLOW_COPY_AND_ASSIGN(InputWindowDialog);
51 };
52
53 #endif // CHROME_BROWSER_INPUT_WINDOW_DIALOG_H_
OLDNEW
« no previous file with comments | « chrome/browser/history/redirect_uitest.cc ('k') | chrome/browser/input_window_dialog_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698