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

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

Issue 8833004: Remove BubbleDelegateView ctor color arg, add simple setter/getter. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Pass set_color SkColor arg by value. 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"
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 // Compensate for padding in anchor. 101 // Compensate for padding in anchor.
102 return BubbleDelegateView::GetAnchorPoint().Add( 102 return BubbleDelegateView::GetAnchorPoint().Add(
103 gfx::Point(0, anchor_view() ? kAnchorVerticalOffset : 0)); 103 gfx::Point(0, anchor_view() ? kAnchorVerticalOffset : 0));
104 } 104 }
105 105
106 FirstRunBubble::FirstRunBubble( 106 FirstRunBubble::FirstRunBubble(
107 Profile* profile, 107 Profile* profile,
108 views::View* anchor_view, 108 views::View* anchor_view,
109 views::BubbleBorder::ArrowLocation arrow_location, 109 views::BubbleBorder::ArrowLocation arrow_location,
110 FirstRun::BubbleType bubble_type) 110 FirstRun::BubbleType bubble_type)
111 : views::BubbleDelegateView(anchor_view, 111 : views::BubbleDelegateView(anchor_view, arrow_location),
112 arrow_location,
113 SK_ColorWHITE),
114 profile_(profile), 112 profile_(profile),
115 bubble_type_(bubble_type) { 113 bubble_type_(bubble_type) {
116 } 114 }
117 115
118 FirstRunBubble::~FirstRunBubble() { 116 FirstRunBubble::~FirstRunBubble() {
119 } 117 }
120 118
121 void FirstRunBubble::ButtonPressed(views::Button* sender, 119 void FirstRunBubble::ButtonPressed(views::Button* sender,
122 const views::Event& event) { 120 const views::Event& event) {
123 if (bubble_type_ == FirstRun::OEM_BUBBLE) { 121 if (bubble_type_ == FirstRun::OEM_BUBBLE) {
124 UserMetrics::RecordAction( 122 UserMetrics::RecordAction(
125 UserMetricsAction("FirstRunOEMBubbleView_Clicked")); 123 UserMetricsAction("FirstRunOEMBubbleView_Clicked"));
126 } 124 }
127 GetWidget()->Close(); 125 GetWidget()->Close();
128 } 126 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/extensions/extension_popup.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