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

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

Issue 10391158: Moves methods for finding browsers to browser_finder. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Include fixs Created 8 years, 7 months 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) 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 #include "chrome/browser/ui/views/first_run_bubble.h" 5 #include "chrome/browser/ui/views/first_run_bubble.h"
6 6
7 #include "base/utf_string_conversions.h" 7 #include "base/utf_string_conversions.h"
8 #include "chrome/browser/first_run/first_run.h" 8 #include "chrome/browser/first_run/first_run.h"
9 #include "chrome/browser/search_engines/util.h" 9 #include "chrome/browser/search_engines/util.h"
10 #include "chrome/browser/ui/browser_list.h" 10 #include "chrome/browser/ui/browser.h"
11 #include "chrome/browser/ui/browser_finder.h"
11 #include "grit/generated_resources.h" 12 #include "grit/generated_resources.h"
12 #include "ui/base/l10n/l10n_util.h" 13 #include "ui/base/l10n/l10n_util.h"
13 #include "ui/base/resource/resource_bundle.h" 14 #include "ui/base/resource/resource_bundle.h"
14 #include "ui/views/controls/label.h" 15 #include "ui/views/controls/label.h"
15 #include "ui/views/controls/link.h" 16 #include "ui/views/controls/link.h"
16 #include "ui/views/layout/grid_layout.h" 17 #include "ui/views/layout/grid_layout.h"
17 #include "ui/views/layout/layout_constants.h" 18 #include "ui/views/layout/layout_constants.h"
18 19
19 namespace { 20 namespace {
20 const int kAnchorVerticalInset = 5; 21 const int kAnchorVerticalInset = 5;
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 profile_(profile) { 89 profile_(profile) {
89 } 90 }
90 91
91 FirstRunBubble::~FirstRunBubble() { 92 FirstRunBubble::~FirstRunBubble() {
92 } 93 }
93 94
94 void FirstRunBubble::LinkClicked(views::Link* source, int event_flags) { 95 void FirstRunBubble::LinkClicked(views::Link* source, int event_flags) {
95 first_run::LogFirstRunMetric(first_run::FIRST_RUN_BUBBLE_CHANGE_INVOKED); 96 first_run::LogFirstRunMetric(first_run::FIRST_RUN_BUBBLE_CHANGE_INVOKED);
96 97
97 // Get |profile_|'s browser before closing the bubble, which deletes |this|. 98 // Get |profile_|'s browser before closing the bubble, which deletes |this|.
98 Browser* browser = BrowserList::GetLastActiveWithProfile(profile_); 99 Browser* browser = browser::FindLastActiveWithProfile(profile_);
99 GetWidget()->Close(); 100 GetWidget()->Close();
100 if (browser) 101 if (browser)
101 browser->OpenSearchEngineOptionsDialog(); 102 browser->OpenSearchEngineOptionsDialog();
102 } 103 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698