Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(222)

Side by Side Diff: chrome/browser/ui/views/first_run_bubble.cc

Issue 8919017: Split UserMetrics into API vs. implementation. Move API to content/public. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Version for commit (merged again). Created 9 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 "chrome/browser/ui/views/window.h" 14 #include "chrome/browser/ui/views/window.h"
15 #include "content/browser/user_metrics.h" 15 #include "content/public/browser/user_metrics.h"
16 #include "grit/chromium_strings.h" 16 #include "grit/chromium_strings.h"
17 #include "grit/generated_resources.h" 17 #include "grit/generated_resources.h"
18 #include "grit/locale_settings.h" 18 #include "grit/locale_settings.h"
19 #include "grit/theme_resources_standard.h" 19 #include "grit/theme_resources_standard.h"
20 #include "ui/base/l10n/l10n_font_util.h" 20 #include "ui/base/l10n/l10n_font_util.h"
21 #include "ui/base/l10n/l10n_util.h" 21 #include "ui/base/l10n/l10n_util.h"
22 #include "ui/base/resource/resource_bundle.h" 22 #include "ui/base/resource/resource_bundle.h"
23 #include "ui/views/controls/button/image_button.h" 23 #include "ui/views/controls/button/image_button.h"
24 #include "ui/views/controls/label.h" 24 #include "ui/views/controls/label.h"
25 #include "ui/views/events/event.h" 25 #include "ui/views/events/event.h"
26 #include "ui/views/layout/grid_layout.h" 26 #include "ui/views/layout/grid_layout.h"
27 #include "ui/views/layout/layout_constants.h" 27 #include "ui/views/layout/layout_constants.h"
28 #include "ui/views/widget/widget.h" 28 #include "ui/views/widget/widget.h"
29 29
30 using content::UserMetricsAction;
31
30 namespace { 32 namespace {
31 const int kAnchorVerticalOffset = -4; 33 const int kAnchorVerticalOffset = -4;
32 const int kLayoutTopInset = 1; 34 const int kLayoutTopInset = 1;
33 const int kLayoutLeftInset = 2; 35 const int kLayoutLeftInset = 2;
34 const int kLayoutBottomInset = 7; 36 const int kLayoutBottomInset = 7;
35 const int kLayoutRightInset = 2; 37 const int kLayoutRightInset = 2;
36 } 38 }
37 39
38 // static 40 // static
39 FirstRunBubble* FirstRunBubble::ShowBubble( 41 FirstRunBubble* FirstRunBubble::ShowBubble(
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 profile_(profile), 115 profile_(profile),
114 bubble_type_(bubble_type) { 116 bubble_type_(bubble_type) {
115 } 117 }
116 118
117 FirstRunBubble::~FirstRunBubble() { 119 FirstRunBubble::~FirstRunBubble() {
118 } 120 }
119 121
120 void FirstRunBubble::ButtonPressed(views::Button* sender, 122 void FirstRunBubble::ButtonPressed(views::Button* sender,
121 const views::Event& event) { 123 const views::Event& event) {
122 if (bubble_type_ == FirstRun::OEM_BUBBLE) { 124 if (bubble_type_ == FirstRun::OEM_BUBBLE) {
123 UserMetrics::RecordAction( 125 content::RecordAction(
124 UserMetricsAction("FirstRunOEMBubbleView_Clicked")); 126 UserMetricsAction("FirstRunOEMBubbleView_Clicked"));
125 } 127 }
126 GetWidget()->Close(); 128 GetWidget()->Close();
127 } 129 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/critical_notification_bubble_view.cc ('k') | chrome/browser/ui/views/frame/browser_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698