OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/gtk/first_run_bubble.h" | 5 #include "chrome/browser/gtk/first_run_bubble.h" |
6 | 6 |
7 #include <gtk/gtk.h> | 7 #include <gtk/gtk.h> |
8 | 8 |
9 #include "app/l10n_util.h" | 9 #include "app/l10n_util.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 30 matching lines...) Expand all Loading... |
41 const gfx::Rect& rect, | 41 const gfx::Rect& rect, |
42 FirstRun::BubbleType bubble_type) { | 42 FirstRun::BubbleType bubble_type) { |
43 new FirstRunBubble(profile, anchor, rect, bubble_type); | 43 new FirstRunBubble(profile, anchor, rect, bubble_type); |
44 } | 44 } |
45 | 45 |
46 void FirstRunBubble::InfoBubbleClosing(InfoBubbleGtk* info_bubble, | 46 void FirstRunBubble::InfoBubbleClosing(InfoBubbleGtk* info_bubble, |
47 bool closed_by_escape) { | 47 bool closed_by_escape) { |
48 // TODO(port): Enable parent window | 48 // TODO(port): Enable parent window |
49 } | 49 } |
50 | 50 |
| 51 bool FirstRunBubble::CloseOnEscape() { |
| 52 return true; |
| 53 } |
| 54 |
51 void FirstRunBubble::Observe(NotificationType type, | 55 void FirstRunBubble::Observe(NotificationType type, |
52 const NotificationSource& source, | 56 const NotificationSource& source, |
53 const NotificationDetails& details) { | 57 const NotificationDetails& details) { |
54 DCHECK(type == NotificationType::BROWSER_THEME_CHANGED); | 58 DCHECK(type == NotificationType::BROWSER_THEME_CHANGED); |
55 | 59 |
56 if (theme_provider_->UseGtkTheme()) { | 60 if (theme_provider_->UseGtkTheme()) { |
57 for (std::vector<GtkWidget*>::iterator it = labels_.begin(); | 61 for (std::vector<GtkWidget*>::iterator it = labels_.begin(); |
58 it != labels_.end(); ++it) { | 62 it != labels_.end(); ++it) { |
59 gtk_widget_modify_fg(*it, GTK_STATE_NORMAL, NULL); | 63 gtk_widget_modify_fg(*it, GTK_STATE_NORMAL, NULL); |
60 } | 64 } |
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
213 void FirstRunBubble::HandleKeepButton(GtkWidget* sender) { | 217 void FirstRunBubble::HandleKeepButton(GtkWidget* sender) { |
214 bubble_->Close(); | 218 bubble_->Close(); |
215 } | 219 } |
216 | 220 |
217 void FirstRunBubble::HandleChangeButton(GtkWidget* sender) { | 221 void FirstRunBubble::HandleChangeButton(GtkWidget* sender) { |
218 bubble_->Close(); | 222 bubble_->Close(); |
219 Browser* browser = BrowserList::GetLastActive(); | 223 Browser* browser = BrowserList::GetLastActive(); |
220 DCHECK(browser); | 224 DCHECK(browser); |
221 browser->OpenSearchEngineOptionsDialog(); | 225 browser->OpenSearchEngineOptionsDialog(); |
222 } | 226 } |
OLD | NEW |