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 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 gfx::Rect ComputeWindowPosition(int width, int height, bool is_RTL); | 97 gfx::Rect ComputeWindowPosition(int width, int height, bool is_RTL); |
98 | 98 |
99 // Create a windows region that looks like a toast of width |w| and height | 99 // Create a windows region that looks like a toast of width |w| and height |
100 // |h|. This is best effort, so we don't care much if the operation fails. | 100 // |h|. This is best effort, so we don't care much if the operation fails. |
101 void SetToastRegion(HWND window, int w, int h); | 101 void SetToastRegion(HWND window, int w, int h); |
102 | 102 |
103 // views::ButtonListener: | 103 // views::ButtonListener: |
104 // We have two buttons and according to what the user clicked we set |result_| | 104 // We have two buttons and according to what the user clicked we set |result_| |
105 // and we should always close and end the modal loop. | 105 // and we should always close and end the modal loop. |
106 virtual void ButtonPressed(views::Button* sender, | 106 virtual void ButtonPressed(views::Button* sender, |
107 const ui::Event& event) OVERRIDE; | 107 const ui::Event& event) override; |
108 | 108 |
109 // views::LinkListener: | 109 // views::LinkListener: |
110 // If the user selects the link we need to fire off the default browser that | 110 // If the user selects the link we need to fire off the default browser that |
111 // by some convoluted logic should not be chrome. | 111 // by some convoluted logic should not be chrome. |
112 virtual void LinkClicked(views::Link* source, int event_flags) OVERRIDE; | 112 virtual void LinkClicked(views::Link* source, int event_flags) override; |
113 | 113 |
114 // Controls which flavor of the heading text to use. | 114 // Controls which flavor of the heading text to use. |
115 size_t flavor_; | 115 size_t flavor_; |
116 | 116 |
117 // We don't own any of these pointers. The |popup_| owns itself and owns the | 117 // We don't own any of these pointers. The |popup_| owns itself and owns the |
118 // other views. | 118 // other views. |
119 views::Widget* popup_; | 119 views::Widget* popup_; |
120 views::RadioButton* try_chrome_; | 120 views::RadioButton* try_chrome_; |
121 views::RadioButton* kill_chrome_; | 121 views::RadioButton* kill_chrome_; |
122 views::RadioButton* dont_try_chrome_; | 122 views::RadioButton* dont_try_chrome_; |
123 views::Checkbox* make_default_; | 123 views::Checkbox* make_default_; |
124 Result result_; | 124 Result result_; |
125 | 125 |
126 DISALLOW_COPY_AND_ASSIGN(TryChromeDialogView); | 126 DISALLOW_COPY_AND_ASSIGN(TryChromeDialogView); |
127 }; | 127 }; |
128 | 128 |
129 #endif // CHROME_BROWSER_FIRST_RUN_TRY_CHROME_DIALOG_VIEW_H_ | 129 #endif // CHROME_BROWSER_FIRST_RUN_TRY_CHROME_DIALOG_VIEW_H_ |
OLD | NEW |