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