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

Side by Side Diff: chrome/browser/ui/gtk/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/gtk/first_run_bubble.h" 5 #include "chrome/browser/ui/gtk/first_run_bubble.h"
6 6
7 #include <gtk/gtk.h> 7 #include <gtk/gtk.h>
8 8
9 #include "base/i18n/rtl.h" 9 #include "base/i18n/rtl.h"
10 #include "base/utf_string_conversions.h" 10 #include "base/utf_string_conversions.h"
11 #include "chrome/browser/first_run/first_run.h" 11 #include "chrome/browser/first_run/first_run.h"
12 #include "chrome/browser/search_engines/util.h" 12 #include "chrome/browser/search_engines/util.h"
13 #include "chrome/browser/ui/browser_list.h" 13 #include "chrome/browser/ui/browser_finder.h"
14 #include "chrome/browser/ui/gtk/gtk_theme_service.h" 14 #include "chrome/browser/ui/gtk/gtk_theme_service.h"
15 #include "grit/generated_resources.h" 15 #include "grit/generated_resources.h"
16 #include "ui/base/gtk/gtk_hig_constants.h" 16 #include "ui/base/gtk/gtk_hig_constants.h"
17 #include "ui/base/l10n/l10n_util.h" 17 #include "ui/base/l10n/l10n_util.h"
18 18
19 namespace { 19 namespace {
20 // Markup for the text of the Omnibox search label 20 // Markup for the text of the Omnibox search label
21 const char kSearchLabelMarkup[] = "<big><b>%s</b></big>"; 21 const char kSearchLabelMarkup[] = "<big><b>%s</b></big>";
22 22
23 // Padding between content and edge of bubble. 23 // Padding between content and edge of bubble.
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 } 82 }
83 83
84 void FirstRunBubble::HandleDestroy(GtkWidget* sender) { 84 void FirstRunBubble::HandleDestroy(GtkWidget* sender) {
85 delete this; 85 delete this;
86 } 86 }
87 87
88 void FirstRunBubble::HandleChangeLink(GtkWidget* sender) { 88 void FirstRunBubble::HandleChangeLink(GtkWidget* sender) {
89 first_run::LogFirstRunMetric(first_run::FIRST_RUN_BUBBLE_CHANGE_INVOKED); 89 first_run::LogFirstRunMetric(first_run::FIRST_RUN_BUBBLE_CHANGE_INVOKED);
90 90
91 // Get |profile_|'s browser before closing the bubble, which deletes |this|. 91 // Get |profile_|'s browser before closing the bubble, which deletes |this|.
92 Browser* browser = BrowserList::GetLastActiveWithProfile(profile_); 92 Browser* browser = browser::FindLastActiveWithProfile(profile_);
93 bubble_->Close(); 93 bubble_->Close();
94 if (browser) 94 if (browser)
95 browser->OpenSearchEngineOptionsDialog(); 95 browser->OpenSearchEngineOptionsDialog();
96 } 96 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698