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 21 matching lines...) Expand all Loading... |
32 const GURL& undo_url, | 32 const GURL& undo_url, |
33 views::View* anchor_view); | 33 views::View* anchor_view); |
34 static void HideBubble(); | 34 static void HideBubble(); |
35 | 35 |
36 private: | 36 private: |
37 HomePageUndoBubble(Browser* browser, bool undo_value_is_ntp, | 37 HomePageUndoBubble(Browser* browser, bool undo_value_is_ntp, |
38 const GURL& undo_url, views::View* anchor_view); | 38 const GURL& undo_url, views::View* anchor_view); |
39 virtual ~HomePageUndoBubble(); | 39 virtual ~HomePageUndoBubble(); |
40 | 40 |
41 // views::BubbleDelegateView: | 41 // views::BubbleDelegateView: |
42 virtual void Init() OVERRIDE; | 42 virtual void Init() override; |
43 virtual void WindowClosing() OVERRIDE; | 43 virtual void WindowClosing() override; |
44 | 44 |
45 // views::LinkListener: | 45 // views::LinkListener: |
46 virtual void LinkClicked(views::Link* source, int event_flags) OVERRIDE; | 46 virtual void LinkClicked(views::Link* source, int event_flags) override; |
47 | 47 |
48 static HomePageUndoBubble* home_page_undo_bubble_; | 48 static HomePageUndoBubble* home_page_undo_bubble_; |
49 | 49 |
50 Browser* browser_; | 50 Browser* browser_; |
51 bool undo_value_is_ntp_; | 51 bool undo_value_is_ntp_; |
52 GURL undo_url_; | 52 GURL undo_url_; |
53 | 53 |
54 DISALLOW_COPY_AND_ASSIGN(HomePageUndoBubble); | 54 DISALLOW_COPY_AND_ASSIGN(HomePageUndoBubble); |
55 }; | 55 }; |
56 | 56 |
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 void HomeButton::NotifyClick(const ui::Event& event) { | 183 void HomeButton::NotifyClick(const ui::Event& event) { |
184 ToolbarButton::NotifyClick(event); | 184 ToolbarButton::NotifyClick(event); |
185 extensions::MaybeShowExtensionControlledHomeNotification(browser_); | 185 extensions::MaybeShowExtensionControlledHomeNotification(browser_); |
186 } | 186 } |
OLD | NEW |