| 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_CHROMEOS_FRAME_LAYOUT_MODE_BUTTON_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_FRAME_LAYOUT_MODE_BUTTON_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_FRAME_LAYOUT_MODE_BUTTON_H_ | 6 #define CHROME_BROWSER_CHROMEOS_FRAME_LAYOUT_MODE_BUTTON_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 #include "content/common/notification_observer.h" | 10 #include "content/common/notification_observer.h" |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 public NotificationObserver { | 23 public NotificationObserver { |
| 24 public: | 24 public: |
| 25 LayoutModeButton(); | 25 LayoutModeButton(); |
| 26 virtual ~LayoutModeButton(); | 26 virtual ~LayoutModeButton(); |
| 27 | 27 |
| 28 // views::* override. | 28 // views::* override. |
| 29 virtual gfx::Size GetPreferredSize() OVERRIDE; | 29 virtual gfx::Size GetPreferredSize() OVERRIDE; |
| 30 virtual bool HitTest(const gfx::Point& l) const OVERRIDE; | 30 virtual bool HitTest(const gfx::Point& l) const OVERRIDE; |
| 31 | 31 |
| 32 // NotificationObserver implementation. | 32 // NotificationObserver implementation. |
| 33 virtual void Observe(NotificationType type, | 33 virtual void Observe(int type, |
| 34 const NotificationSource& source, | 34 const NotificationSource& source, |
| 35 const NotificationDetails& details) OVERRIDE; | 35 const NotificationDetails& details) OVERRIDE; |
| 36 | 36 |
| 37 void Init(); | 37 void Init(); |
| 38 | 38 |
| 39 private: | 39 private: |
| 40 // views::ButtonListener implementation. | 40 // views::ButtonListener implementation. |
| 41 virtual void ButtonPressed(views::Button* sender, const views::Event& event) | 41 virtual void ButtonPressed(views::Button* sender, const views::Event& event) |
| 42 OVERRIDE; | 42 OVERRIDE; |
| 43 | 43 |
| 44 // Update our icon and tooltip appropriately for the current layout mode. | 44 // Update our icon and tooltip appropriately for the current layout mode. |
| 45 void UpdateForCurrentLayoutMode(); | 45 void UpdateForCurrentLayoutMode(); |
| 46 | 46 |
| 47 // A registrar for subscribing to LAYOUT_MODE_CHANGED notifications. | 47 // A registrar for subscribing to LAYOUT_MODE_CHANGED notifications. |
| 48 NotificationRegistrar registrar_; | 48 NotificationRegistrar registrar_; |
| 49 | 49 |
| 50 DISALLOW_COPY_AND_ASSIGN(LayoutModeButton); | 50 DISALLOW_COPY_AND_ASSIGN(LayoutModeButton); |
| 51 }; | 51 }; |
| 52 | 52 |
| 53 } // namespace chromeos | 53 } // namespace chromeos |
| 54 | 54 |
| 55 #endif // CHROME_BROWSER_CHROMEOS_FRAME_LAYOUT_MODE_BUTTON_H_ | 55 #endif // CHROME_BROWSER_CHROMEOS_FRAME_LAYOUT_MODE_BUTTON_H_ |
| OLD | NEW |