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_UI_VIEWS_TRY_CHROME_DIALOG_VIEW_H_ |
6 #define CHROME_BROWSER_FIRST_RUN_TRY_CHROME_DIALOG_VIEW_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_TRY_CHROME_DIALOG_VIEW_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 | 9 |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
11 #include "base/macros.h" | 11 #include "base/macros.h" |
12 #include "ui/gfx/geometry/rect.h" | 12 #include "ui/gfx/geometry/rect.h" |
13 #include "ui/gfx/geometry/size.h" | 13 #include "ui/gfx/geometry/size.h" |
14 #include "ui/gfx/native_widget_types.h" | 14 #include "ui/gfx/native_widget_types.h" |
15 #include "ui/views/controls/button/button.h" | 15 #include "ui/views/controls/button/button.h" |
16 #include "ui/views/controls/link_listener.h" | 16 #include "ui/views/controls/link_listener.h" |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
101 // views::ButtonListener: | 101 // views::ButtonListener: |
102 // We have two buttons and according to what the user clicked we set |result_| | 102 // We have two buttons and according to what the user clicked we set |result_| |
103 // and we should always close and end the modal loop. | 103 // and we should always close and end the modal loop. |
104 void ButtonPressed(views::Button* sender, const ui::Event& event) override; | 104 void ButtonPressed(views::Button* sender, const ui::Event& event) override; |
105 | 105 |
106 // views::LinkListener: | 106 // views::LinkListener: |
107 // If the user selects the link we need to fire off the default browser that | 107 // If the user selects the link we need to fire off the default browser that |
108 // by some convoluted logic should not be chrome. | 108 // by some convoluted logic should not be chrome. |
109 void LinkClicked(views::Link* source, int event_flags) override; | 109 void LinkClicked(views::Link* source, int event_flags) override; |
110 | 110 |
111 friend class TryChromeDialogTest; | |
Peter Kasting
2017/04/28 06:16:41
Nit: Friend declarations typically go at the top o
ananta
2017/04/28 14:57:01
no longer needed with the force parameter.
| |
112 | |
111 // Controls which flavor of the heading text to use. | 113 // Controls which flavor of the heading text to use. |
112 size_t flavor_; | 114 size_t flavor_; |
113 | 115 |
114 // We don't own any of these pointers. The |popup_| owns itself and owns the | 116 // We don't own any of these pointers. The |popup_| owns itself and owns the |
115 // other views. | 117 // other views. |
116 views::Widget* popup_; | 118 views::Widget* popup_; |
117 views::RadioButton* try_chrome_; | 119 views::RadioButton* try_chrome_; |
118 views::RadioButton* kill_chrome_; | 120 views::RadioButton* kill_chrome_; |
119 views::RadioButton* dont_try_chrome_; | 121 views::RadioButton* dont_try_chrome_; |
120 views::Checkbox* make_default_; | 122 views::Checkbox* make_default_; |
121 Result result_; | 123 Result result_; |
124 static bool for_testing_; | |
122 | 125 |
123 DISALLOW_COPY_AND_ASSIGN(TryChromeDialogView); | 126 DISALLOW_COPY_AND_ASSIGN(TryChromeDialogView); |
124 }; | 127 }; |
125 | 128 |
126 #endif // CHROME_BROWSER_FIRST_RUN_TRY_CHROME_DIALOG_VIEW_H_ | 129 #endif // CHROME_BROWSER_UI_VIEWS_TRY_CHROME_DIALOG_VIEW_H_ |
OLD | NEW |