OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #ifndef CHROME_BROWSER_UI_GTK_RELOAD_BUTTON_GTK_H_ | 5 #ifndef CHROME_BROWSER_UI_GTK_RELOAD_BUTTON_GTK_H_ |
6 #define CHROME_BROWSER_UI_GTK_RELOAD_BUTTON_GTK_H_ | 6 #define CHROME_BROWSER_UI_GTK_RELOAD_BUTTON_GTK_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <gtk/gtk.h> | 9 #include <gtk/gtk.h> |
10 | 10 |
(...skipping 17 matching lines...) Expand all Loading... |
28 ReloadButtonGtk(LocationBarViewGtk* location_bar, Browser* browser); | 28 ReloadButtonGtk(LocationBarViewGtk* location_bar, Browser* browser); |
29 virtual ~ReloadButtonGtk(); | 29 virtual ~ReloadButtonGtk(); |
30 | 30 |
31 GtkWidget* widget() const { return widget_.get(); } | 31 GtkWidget* widget() const { return widget_.get(); } |
32 | 32 |
33 // Ask for a specified button state. If |force| is true this will be applied | 33 // Ask for a specified button state. If |force| is true this will be applied |
34 // immediately. | 34 // immediately. |
35 void ChangeMode(Mode mode, bool force); | 35 void ChangeMode(Mode mode, bool force); |
36 | 36 |
37 // Provide NotificationObserver implementation. | 37 // Provide NotificationObserver implementation. |
38 virtual void Observe(NotificationType type, | 38 virtual void Observe(int type, |
39 const NotificationSource& source, | 39 const NotificationSource& source, |
40 const NotificationDetails& /* details */); | 40 const NotificationDetails& /* details */); |
41 | 41 |
42 private: | 42 private: |
43 friend class ReloadButtonGtkTest; | 43 friend class ReloadButtonGtkTest; |
44 | 44 |
45 CHROMEGTK_CALLBACK_0(ReloadButtonGtk, void, OnClicked); | 45 CHROMEGTK_CALLBACK_0(ReloadButtonGtk, void, OnClicked); |
46 CHROMEGTK_CALLBACK_1(ReloadButtonGtk, gboolean, OnExpose, GdkEventExpose*); | 46 CHROMEGTK_CALLBACK_1(ReloadButtonGtk, gboolean, OnExpose, GdkEventExpose*); |
47 CHROMEGTK_CALLBACK_1(ReloadButtonGtk, | 47 CHROMEGTK_CALLBACK_1(ReloadButtonGtk, |
48 gboolean, | 48 gboolean, |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
94 // True if we should pretend the button is hovered. | 94 // True if we should pretend the button is hovered. |
95 bool testing_mouse_hovered_; | 95 bool testing_mouse_hovered_; |
96 // Increments when we would tell the browser to "reload", so | 96 // Increments when we would tell the browser to "reload", so |
97 // test code can tell whether we did so (as there may be no |browser_|). | 97 // test code can tell whether we did so (as there may be no |browser_|). |
98 int testing_reload_count_; | 98 int testing_reload_count_; |
99 | 99 |
100 DISALLOW_IMPLICIT_CONSTRUCTORS(ReloadButtonGtk); | 100 DISALLOW_IMPLICIT_CONSTRUCTORS(ReloadButtonGtk); |
101 }; | 101 }; |
102 | 102 |
103 #endif // CHROME_BROWSER_UI_GTK_RELOAD_BUTTON_GTK_H_ | 103 #endif // CHROME_BROWSER_UI_GTK_RELOAD_BUTTON_GTK_H_ |
OLD | NEW |