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_STATUS_MEMORY_MENU_BUTTON_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_STATUS_MEMORY_MENU_BUTTON_H_ |
6 #define CHROME_BROWSER_CHROMEOS_STATUS_MEMORY_MENU_BUTTON_H_ | 6 #define CHROME_BROWSER_CHROMEOS_STATUS_MEMORY_MENU_BUTTON_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "base/timer.h" | 10 #include "base/timer.h" |
11 #include "chrome/browser/chromeos/status/status_area_button.h" | 11 #include "chrome/browser/chromeos/status/status_area_button.h" |
12 #include "content/public/browser/notification_observer.h" | 12 #include "content/public/browser/notification_observer.h" |
13 #include "content/public/browser/notification_registrar.h" | 13 #include "content/public/browser/notification_registrar.h" |
14 #include "views/controls/menu/menu_delegate.h" | 14 #include "views/controls/menu/menu_delegate.h" |
15 #include "views/controls/menu/view_menu_delegate.h" | 15 #include "views/controls/menu/view_menu_delegate.h" |
16 | 16 |
17 namespace base { | 17 namespace base { |
18 struct SystemMemoryInfoKB; | 18 struct SystemMemoryInfoKB; |
19 } | 19 } |
20 | 20 |
21 namespace views { | 21 namespace views { |
22 class MenuItemView; | 22 class MenuItemView; |
23 class MenuRunner; | 23 class MenuRunner; |
24 } | 24 } |
25 | 25 |
26 namespace chromeos { | |
27 | |
28 // Memory debugging display that lives in the status area. | 26 // Memory debugging display that lives in the status area. |
29 class MemoryMenuButton : public StatusAreaButton, | 27 class MemoryMenuButton : public StatusAreaButton, |
30 public views::MenuDelegate, | 28 public views::MenuDelegate, |
31 public views::ViewMenuDelegate, | 29 public views::ViewMenuDelegate, |
32 public content::NotificationObserver { | 30 public content::NotificationObserver { |
33 public: | 31 public: |
34 explicit MemoryMenuButton(StatusAreaButton::Delegate* delegate); | 32 explicit MemoryMenuButton(StatusAreaButton::Delegate* delegate); |
35 virtual ~MemoryMenuButton(); | 33 virtual ~MemoryMenuButton(); |
36 | 34 |
37 // views::MenuDelegate implementation | 35 // views::MenuDelegate implementation |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
71 content::NotificationRegistrar registrar_; | 69 content::NotificationRegistrar registrar_; |
72 | 70 |
73 // Number of renderer kills we have observed. | 71 // Number of renderer kills we have observed. |
74 int renderer_kills_; | 72 int renderer_kills_; |
75 | 73 |
76 scoped_ptr<views::MenuRunner> menu_runner_; | 74 scoped_ptr<views::MenuRunner> menu_runner_; |
77 | 75 |
78 DISALLOW_COPY_AND_ASSIGN(MemoryMenuButton); | 76 DISALLOW_COPY_AND_ASSIGN(MemoryMenuButton); |
79 }; | 77 }; |
80 | 78 |
81 } // namespace chromeos | |
82 | |
83 #endif // CHROME_BROWSER_CHROMEOS_STATUS_MEMORY_MENU_BUTTON_H_ | 79 #endif // CHROME_BROWSER_CHROMEOS_STATUS_MEMORY_MENU_BUTTON_H_ |
OLD | NEW |