| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 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 CHROME_BROWSER_FIRST_RUN_TRY_CHROME_DIALOG_VIEW_H_ | 5 #ifndef CHROME_BROWSER_FIRST_RUN_TRY_CHROME_DIALOG_VIEW_H_ |
| 6 #define CHROME_BROWSER_FIRST_RUN_TRY_CHROME_DIALOG_VIEW_H_ | 6 #define CHROME_BROWSER_FIRST_RUN_TRY_CHROME_DIALOG_VIEW_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
| 10 #include "ui/gfx/native_widget_types.h" | 10 #include "ui/gfx/native_widget_types.h" |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 78 // |flavor| can be 0, 1, 2 or 3 and selects what strings to present. | 78 // |flavor| can be 0, 1, 2 or 3 and selects what strings to present. |
| 79 // |listener| will be notified when the dialog becomes active and when it is | 79 // |listener| will be notified when the dialog becomes active and when it is |
| 80 // dismissed. | 80 // dismissed. |
| 81 // Note that the dialog has no parent and it will position itself in a lower | 81 // Note that the dialog has no parent and it will position itself in a lower |
| 82 // corner of the screen. The dialog does not steal focus and does not have an | 82 // corner of the screen. The dialog does not steal focus and does not have an |
| 83 // entry in the taskbar. | 83 // entry in the taskbar. |
| 84 static Result Show(size_t flavor, const ActiveModalDialogListener& listener); | 84 static Result Show(size_t flavor, const ActiveModalDialogListener& listener); |
| 85 | 85 |
| 86 private: | 86 private: |
| 87 explicit TryChromeDialogView(size_t flavor); | 87 explicit TryChromeDialogView(size_t flavor); |
| 88 virtual ~TryChromeDialogView(); | 88 ~TryChromeDialogView() override; |
| 89 | 89 |
| 90 Result ShowModal(const ActiveModalDialogListener& listener); | 90 Result ShowModal(const ActiveModalDialogListener& listener); |
| 91 | 91 |
| 92 // Returns a screen rectangle that is fit to show the window. In particular | 92 // Returns a screen rectangle that is fit to show the window. In particular |
| 93 // it has the following properties: a) is visible and b) is attached to the | 93 // it has the following properties: a) is visible and b) is attached to the |
| 94 // bottom of the working area. For LTR machines it returns a left side | 94 // bottom of the working area. For LTR machines it returns a left side |
| 95 // rectangle and for RTL it returns a right side rectangle so that the dialog | 95 // rectangle and for RTL it returns a right side rectangle so that the dialog |
| 96 // does not compete with the standar place of the start menu. | 96 // does not compete with the standar place of the start menu. |
| 97 gfx::Rect ComputeWindowPosition(int width, int height, bool is_RTL); | 97 gfx::Rect ComputeWindowPosition(int width, int height, bool is_RTL); |
| 98 | 98 |
| (...skipping 20 matching lines...) Expand all Loading... |
| 119 views::RadioButton* try_chrome_; | 119 views::RadioButton* try_chrome_; |
| 120 views::RadioButton* kill_chrome_; | 120 views::RadioButton* kill_chrome_; |
| 121 views::RadioButton* dont_try_chrome_; | 121 views::RadioButton* dont_try_chrome_; |
| 122 views::Checkbox* make_default_; | 122 views::Checkbox* make_default_; |
| 123 Result result_; | 123 Result result_; |
| 124 | 124 |
| 125 DISALLOW_COPY_AND_ASSIGN(TryChromeDialogView); | 125 DISALLOW_COPY_AND_ASSIGN(TryChromeDialogView); |
| 126 }; | 126 }; |
| 127 | 127 |
| 128 #endif // CHROME_BROWSER_FIRST_RUN_TRY_CHROME_DIALOG_VIEW_H_ | 128 #endif // CHROME_BROWSER_FIRST_RUN_TRY_CHROME_DIALOG_VIEW_H_ |
| OLD | NEW |