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

Side by Side Diff: ash/display/display_error_dialog.h

Issue 10986087: Adds DisplayErrorDialog to show the error message of the failure of mirroring to the users. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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 | Annotate | Revision Log
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 ASH_DISPLAY_DISPLAY_ERROR_DIALOG_H_
6 #define ASH_DISPLAY_DISPLAY_ERROR_DIALOG_H_
7
8 #include "ash/display_controller.h"
9 #include "base/compiler_specific.h"
10 #include "ui/aura/display_observer.h"
11 #include "ui/views/window/dialog_delegate.h"
12
13 namespace aura {
14 class RootWindow;
15 } // namespace aura
16
17 namespace gfx {
18 class Display;
19 class Size;
20 } // namespace gfx
21
22 namespace views {
23 class Label;
24 } // namespace views
25
26 namespace ash {
27 namespace internal {
28
29 // Dialog to show error messages when it fails to change the display
30 // configuration to mirroring.
31 class DisplayErrorDialog : public views::DialogDelegateView,
32 public ash::DisplayController::Observer,
33 public aura::DisplayObserver {
34 public:
35 // Shows the dialog to show errors.
36 static void ShowDialog();
37
38 private:
39 DisplayErrorDialog();
40 virtual ~DisplayErrorDialog();
41
42 // views::DialogDelegate overrides:
43 virtual int GetDialogButtons() const OVERRIDE;
44
45 // views::WidgetDelegate overrides::
46 virtual ui::ModalType GetModalType() const OVERRIDE;
47 virtual views::View* GetContentsView() OVERRIDE;
48
49 // views::View overrides:
50 virtual gfx::Size GetPreferredSize() OVERRIDE;
51
52 // ash::DisplayController::Observer overrides:
53 virtual void OnDisplayConfigurationChanging() OVERRIDE;
54
55 // aura::DisplayObserver overrides:
56 virtual void OnDisplayBoundsChanged(const gfx::Display& display) OVERRIDE;
57 virtual void OnDisplayAdded(const gfx::Display& new_display) OVERRIDE;
58 virtual void OnDisplayRemoved(const gfx::Display& old_display) OVERRIDE;
59
60 views::Label* label_;
61 DISALLOW_COPY_AND_ASSIGN(DisplayErrorDialog);
62 };
63
64 } // namespace internal
65 } // namespace ash
66
67 #endif // ASH_DISPLAY_DISPLAY_ERROR_DIALOG_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698