OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #include "chrome/browser/ui/views/session_crashed_bubble_view.h" | 5 #include "chrome/browser/ui/views/session_crashed_bubble_view.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #include <string> | 8 #include <string> |
9 #include <utility> | 9 #include <utility> |
10 #include <vector> | 10 #include <vector> |
(...skipping 20 matching lines...) Expand all Loading... |
31 #include "components/strings/grit/components_strings.h" | 31 #include "components/strings/grit/components_strings.h" |
32 #include "content/public/browser/browser_context.h" | 32 #include "content/public/browser/browser_context.h" |
33 #include "content/public/browser/browser_thread.h" | 33 #include "content/public/browser/browser_thread.h" |
34 #include "ui/base/l10n/l10n_util.h" | 34 #include "ui/base/l10n/l10n_util.h" |
35 #include "ui/views/controls/button/checkbox.h" | 35 #include "ui/views/controls/button/checkbox.h" |
36 #include "ui/views/controls/label.h" | 36 #include "ui/views/controls/label.h" |
37 #include "ui/views/controls/separator.h" | 37 #include "ui/views/controls/separator.h" |
38 #include "ui/views/controls/styled_label.h" | 38 #include "ui/views/controls/styled_label.h" |
39 #include "ui/views/layout/fill_layout.h" | 39 #include "ui/views/layout/fill_layout.h" |
40 #include "ui/views/layout/grid_layout.h" | 40 #include "ui/views/layout/grid_layout.h" |
41 #include "ui/views/layout/layout_constants.h" | |
42 #include "ui/views/widget/widget.h" | 41 #include "ui/views/widget/widget.h" |
43 | 42 |
44 using views::GridLayout; | 43 using views::GridLayout; |
45 | 44 |
46 namespace { | 45 namespace { |
47 | 46 |
48 // Fixed width of the column holding the description label of the bubble. | 47 // Fixed width of the column holding the description label of the bubble. |
49 const int kWidthOfDescriptionText = 320; | 48 const int kWidthOfDescriptionText = 320; |
50 | 49 |
51 // Distance between checkbox and the text to the right of it. | 50 // Distance between checkbox and the text to the right of it. |
(...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
345 // There's no opt-out choice in the crash restore bubble. | 344 // There's no opt-out choice in the crash restore bubble. |
346 if (uma_option_ && uma_option_->checked()) { | 345 if (uma_option_ && uma_option_->checked()) { |
347 ChangeMetricsReportingState(true); | 346 ChangeMetricsReportingState(true); |
348 RecordBubbleHistogramValue(SESSION_CRASHED_BUBBLE_UMA_OPTIN); | 347 RecordBubbleHistogramValue(SESSION_CRASHED_BUBBLE_UMA_OPTIN); |
349 } | 348 } |
350 } | 349 } |
351 | 350 |
352 void SessionCrashedBubbleView::CloseBubble() { | 351 void SessionCrashedBubbleView::CloseBubble() { |
353 GetWidget()->Close(); | 352 GetWidget()->Close(); |
354 } | 353 } |
OLD | NEW |