Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(873)

Unified Diff: chrome/browser/chromeos/status/memory_menu_button.h

Issue 7720012: Moves ownership of MenuItemView to MenuRunner as well as responbility (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix unit test Created 9 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chromeos/status/memory_menu_button.h
diff --git a/chrome/browser/chromeos/status/memory_menu_button.h b/chrome/browser/chromeos/status/memory_menu_button.h
index 7e2c83aa6c01a05563883e1f2c9e7d1b756cdf3e..2802c2690109193c00e195f628430b992001596f 100644
--- a/chrome/browser/chromeos/status/memory_menu_button.h
+++ b/chrome/browser/chromeos/status/memory_menu_button.h
@@ -20,6 +20,7 @@ struct SystemMemoryInfoKB;
namespace views {
class MenuItemView;
+class MenuRunner;
}
namespace chromeos {
@@ -58,18 +59,14 @@ class MemoryMenuButton : public StatusAreaButton,
// Execute command id for each renderer. Used for heap profiling.
void SendCommandToRenderers(int id);
- // Create and initialize menu if not already present.
- void EnsureMenu();
+ // Creates and returns the menu. The caller owns the returned value.
+ views::MenuItemView* CreateMenu();
// Updates text and schedules the timer to fire at the next minute interval.
void UpdateTextAndSetNextTimer();
base::OneShotTimer<MemoryMenuButton> timer_;
- // NOTE: we use a scoped_ptr here as menu calls into 'this' from the
- // constructor.
- scoped_ptr<views::MenuItemView> menu_;
-
// Raw data from /proc/meminfo
scoped_ptr<base::SystemMemoryInfoKB> meminfo_;

Powered by Google App Engine
This is Rietveld 408576698