OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/toolbar/home_button.h" | 5 #include "chrome/browser/ui/views/toolbar/home_button.h" |
6 | 6 |
7 #include "base/prefs/pref_service.h" | 7 #include "base/prefs/pref_service.h" |
8 #include "chrome/browser/profiles/profile.h" | 8 #include "chrome/browser/profiles/profile.h" |
9 #include "chrome/browser/ui/browser.h" | 9 #include "chrome/browser/ui/browser.h" |
10 #include "chrome/browser/ui/views/settings_api_bubble_helper_views.h" | 10 #include "chrome/browser/ui/views/settings_api_bubble_helper_views.h" |
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
173 GURL old_homepage(prefs->GetString(prefs::kHomePage)); | 173 GURL old_homepage(prefs->GetString(prefs::kHomePage)); |
174 | 174 |
175 prefs->SetBoolean(prefs::kHomePageIsNewTabPage, false); | 175 prefs->SetBoolean(prefs::kHomePageIsNewTabPage, false); |
176 prefs->SetString(prefs::kHomePage, new_homepage_url.spec()); | 176 prefs->SetString(prefs::kHomePage, new_homepage_url.spec()); |
177 | 177 |
178 HomePageUndoBubble::ShowBubble(browser_, old_is_ntp, old_homepage, this); | 178 HomePageUndoBubble::ShowBubble(browser_, old_is_ntp, old_homepage, this); |
179 } | 179 } |
180 return ui::DragDropTypes::DRAG_NONE; | 180 return ui::DragDropTypes::DRAG_NONE; |
181 } | 181 } |
182 | 182 |
| 183 const char* HomeButton::GetClassName() const { |
| 184 return "HomeButton"; |
| 185 } |
| 186 |
183 void HomeButton::NotifyClick(const ui::Event& event) { | 187 void HomeButton::NotifyClick(const ui::Event& event) { |
184 ToolbarButton::NotifyClick(event); | 188 ToolbarButton::NotifyClick(event); |
185 extensions::MaybeShowExtensionControlledHomeNotification(browser_); | 189 extensions::MaybeShowExtensionControlledHomeNotification(browser_); |
186 } | 190 } |
OLD | NEW |