Pin Chrome's shortcut to the Win10 Start menu on install and OS upgrade.
[chromium-blink-merge.git] / ui / base / models / dialog_model.h
blob94f85e98e7aead84e9d6c0c0c1679039a30355fb
1 // Copyright (c) 2013 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.
5 #ifndef UI_BASE_MODELS_DIALOG_MODEL_H_
6 #define UI_BASE_MODELS_DIALOG_MODEL_H_
8 #include "base/strings/string16.h"
9 #include "ui/base/ui_base_export.h"
10 #include "ui/base/ui_base_types.h"
12 namespace ui {
14 // A model representing a dialog window. The model provides the content to show
15 // to the user (i.e. title), and the ways the user can interact with it
16 // (i.e. the buttons).
17 class UI_BASE_EXPORT DialogModel {
18 public:
19 virtual ~DialogModel();
21 // Returns the title of the dialog.
22 virtual base::string16 GetDialogTitle() const = 0;
24 // Returns a mask specifying which of the available DialogButtons are visible
25 // for the dialog. Note: Dialogs with just an OK button are frowned upon.
26 virtual int GetDialogButtons() const = 0;
28 // Returns the default dialog button. This should not be a mask as only
29 // one button should ever be the default button. Return
30 // ui::DIALOG_BUTTON_NONE if there is no default. Default
31 // behavior is to return ui::DIALOG_BUTTON_OK or
32 // ui::DIALOG_BUTTON_CANCEL (in that order) if they are
33 // present, ui::DIALOG_BUTTON_NONE otherwise.
34 virtual int GetDefaultDialogButton() const = 0;
36 // Returns whether the default dialog button should be colored blue as a call
37 // to action.
38 virtual bool ShouldDefaultButtonBeBlue() const = 0;
40 // Returns the label of the specified dialog button.
41 virtual base::string16 GetDialogButtonLabel(DialogButton button) const = 0;
43 // Returns whether the specified dialog button is enabled.
44 virtual bool IsDialogButtonEnabled(DialogButton button) const = 0;
47 } // namespace ui
49 #endif // UI_BASE_MODELS_DIALOG_MODEL_H_