| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef VIEWS_CONTROLS_MESSAGE_BOX_VIEW_H_ | 5 #ifndef VIEWS_CONTROLS_MESSAGE_BOX_VIEW_H_ |
| 6 #define VIEWS_CONTROLS_MESSAGE_BOX_VIEW_H_ | 6 #define VIEWS_CONTROLS_MESSAGE_BOX_VIEW_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 | 58 |
| 59 // View: | 59 // View: |
| 60 virtual void GetAccessibleState(ui::AccessibleViewState* state) OVERRIDE; | 60 virtual void GetAccessibleState(ui::AccessibleViewState* state) OVERRIDE; |
| 61 | 61 |
| 62 protected: | 62 protected: |
| 63 // View: | 63 // View: |
| 64 virtual void ViewHierarchyChanged(bool is_add, | 64 virtual void ViewHierarchyChanged(bool is_add, |
| 65 views::View* parent, | 65 views::View* parent, |
| 66 views::View* child) OVERRIDE; | 66 views::View* child) OVERRIDE; |
| 67 // Handles Ctrl-C and writes the message in the system clipboard. | 67 // Handles Ctrl-C and writes the message in the system clipboard. |
| 68 virtual bool AcceleratorPressed( | 68 virtual bool AcceleratorPressed(const ui::Accelerator& accelerator) OVERRIDE; |
| 69 const views::Accelerator& accelerator) OVERRIDE; | |
| 70 | 69 |
| 71 private: | 70 private: |
| 72 // Sets up the layout manager and initializes the prompt field. This should | 71 // Sets up the layout manager and initializes the prompt field. This should |
| 73 // only be called once, from the constructor. | 72 // only be called once, from the constructor. |
| 74 void Init(int dialog_flags, const string16& default_prompt); | 73 void Init(int dialog_flags, const string16& default_prompt); |
| 75 | 74 |
| 76 // Sets up the layout manager based on currently initialized views. Should be | 75 // Sets up the layout manager based on currently initialized views. Should be |
| 77 // called when a view is initialized or changed. | 76 // called when a view is initialized or changed. |
| 78 void ResetLayoutManager(); | 77 void ResetLayoutManager(); |
| 79 | 78 |
| (...skipping 11 matching lines...) Expand all Loading... |
| 91 | 90 |
| 92 // Maximum width of the message label. | 91 // Maximum width of the message label. |
| 93 int message_width_; | 92 int message_width_; |
| 94 | 93 |
| 95 DISALLOW_COPY_AND_ASSIGN(MessageBoxView); | 94 DISALLOW_COPY_AND_ASSIGN(MessageBoxView); |
| 96 }; | 95 }; |
| 97 | 96 |
| 98 } // namespace views | 97 } // namespace views |
| 99 | 98 |
| 100 #endif // VIEWS_CONTROLS_MESSAGE_BOX_VIEW_H_ | 99 #endif // VIEWS_CONTROLS_MESSAGE_BOX_VIEW_H_ |
| OLD | NEW |