| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/first_run_bubble.h" | 5 #include "chrome/browser/ui/views/first_run_bubble.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/utf_string_conversions.h" | 8 #include "base/utf_string_conversions.h" |
| 9 #include "chrome/browser/first_run/first_run.h" | 9 #include "chrome/browser/first_run/first_run.h" |
| 10 #include "chrome/browser/search_engines/util.h" | 10 #include "chrome/browser/search_engines/util.h" |
| 11 #include "chrome/browser/ui/browser.h" | 11 #include "chrome/browser/ui/browser.h" |
| 12 #include "chrome/browser/ui/browser_list.h" | 12 #include "chrome/browser/ui/browser_list.h" |
| 13 #include "chrome/browser/ui/browser_window.h" | 13 #include "chrome/browser/ui/browser_window.h" |
| 14 #include "content/browser/user_metrics.h" | 14 #include "content/browser/user_metrics.h" |
| 15 #include "grit/chromium_strings.h" | 15 #include "grit/chromium_strings.h" |
| 16 #include "grit/generated_resources.h" | 16 #include "grit/generated_resources.h" |
| 17 #include "grit/locale_settings.h" | 17 #include "grit/locale_settings.h" |
| 18 #include "grit/theme_resources_standard.h" | 18 #include "grit/theme_resources_standard.h" |
| 19 #include "ui/base/l10n/l10n_font_util.h" | 19 #include "ui/base/l10n/l10n_font_util.h" |
| 20 #include "ui/base/l10n/l10n_util.h" | 20 #include "ui/base/l10n/l10n_util.h" |
| 21 #include "ui/base/resource/resource_bundle.h" | 21 #include "ui/base/resource/resource_bundle.h" |
| 22 #include "ui/views/events/event.h" | 22 #include "ui/views/events/event.h" |
| 23 #include "ui/views/layout/grid_layout.h" | 23 #include "ui/views/layout/grid_layout.h" |
| 24 #include "ui/views/layout/layout_constants.h" | 24 #include "ui/views/layout/layout_constants.h" |
| 25 #include "ui/views/widget/widget.h" | |
| 26 #include "views/controls/button/image_button.h" | 25 #include "views/controls/button/image_button.h" |
| 27 #include "views/controls/label.h" | 26 #include "views/controls/label.h" |
| 27 #include "views/widget/widget.h" |
| 28 | 28 |
| 29 namespace { | 29 namespace { |
| 30 const int kAnchorVerticalOffset = -4; | 30 const int kAnchorVerticalOffset = -4; |
| 31 const int kLayoutTopInset = 1; | 31 const int kLayoutTopInset = 1; |
| 32 const int kLayoutLeftInset = 2; | 32 const int kLayoutLeftInset = 2; |
| 33 const int kLayoutBottomInset = 7; | 33 const int kLayoutBottomInset = 7; |
| 34 const int kLayoutRightInset = 2; | 34 const int kLayoutRightInset = 2; |
| 35 } | 35 } |
| 36 | 36 |
| 37 // static | 37 // static |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 118 } | 118 } |
| 119 | 119 |
| 120 void FirstRunBubble::ButtonPressed(views::Button* sender, | 120 void FirstRunBubble::ButtonPressed(views::Button* sender, |
| 121 const views::Event& event) { | 121 const views::Event& event) { |
| 122 if (bubble_type_ == FirstRun::OEM_BUBBLE) { | 122 if (bubble_type_ == FirstRun::OEM_BUBBLE) { |
| 123 UserMetrics::RecordAction( | 123 UserMetrics::RecordAction( |
| 124 UserMetricsAction("FirstRunOEMBubbleView_Clicked")); | 124 UserMetricsAction("FirstRunOEMBubbleView_Clicked")); |
| 125 } | 125 } |
| 126 GetWidget()->Close(); | 126 GetWidget()->Close(); |
| 127 } | 127 } |
| OLD | NEW |