| 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 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 |
| 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 void ButtonPressed(views::Button* sender, const ui::Event& event) override; |
| 107 const ui::Event& event) override; | |
| 108 | 107 |
| 109 // views::LinkListener: | 108 // views::LinkListener: |
| 110 // If the user selects the link we need to fire off the default browser that | 109 // If the user selects the link we need to fire off the default browser that |
| 111 // by some convoluted logic should not be chrome. | 110 // by some convoluted logic should not be chrome. |
| 112 virtual void LinkClicked(views::Link* source, int event_flags) override; | 111 void LinkClicked(views::Link* source, int event_flags) override; |
| 113 | 112 |
| 114 // Controls which flavor of the heading text to use. | 113 // Controls which flavor of the heading text to use. |
| 115 size_t flavor_; | 114 size_t flavor_; |
| 116 | 115 |
| 117 // 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 |
| 118 // other views. | 117 // other views. |
| 119 views::Widget* popup_; | 118 views::Widget* popup_; |
| 120 views::RadioButton* try_chrome_; | 119 views::RadioButton* try_chrome_; |
| 121 views::RadioButton* kill_chrome_; | 120 views::RadioButton* kill_chrome_; |
| 122 views::RadioButton* dont_try_chrome_; | 121 views::RadioButton* dont_try_chrome_; |
| 123 views::Checkbox* make_default_; | 122 views::Checkbox* make_default_; |
| 124 Result result_; | 123 Result result_; |
| 125 | 124 |
| 126 DISALLOW_COPY_AND_ASSIGN(TryChromeDialogView); | 125 DISALLOW_COPY_AND_ASSIGN(TryChromeDialogView); |
| 127 }; | 126 }; |
| 128 | 127 |
| 129 #endif // CHROME_BROWSER_FIRST_RUN_TRY_CHROME_DIALOG_VIEW_H_ | 128 #endif // CHROME_BROWSER_FIRST_RUN_TRY_CHROME_DIALOG_VIEW_H_ |
| OLD | NEW |