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

Unified Diff: chrome/browser/ui/views/frame/system_menu_model.h

Issue 9966007: views: Extract SystemMenuModel from native_menu_win.*. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: include string16 Created 8 years, 8 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/ui/views/frame/system_menu_model.h
diff --git a/chrome/browser/ui/views/frame/system_menu_model.h b/chrome/browser/ui/views/frame/system_menu_model.h
new file mode 100644
index 0000000000000000000000000000000000000000..93b2ea0320ef06b4ae5d1eda553ad6a09b306bc2
--- /dev/null
+++ b/chrome/browser/ui/views/frame/system_menu_model.h
@@ -0,0 +1,31 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_UI_VIEWS_FRAME_SYSTEM_MENU_MODEL_H_
+#define CHROME_BROWSER_UI_VIEWS_FRAME_SYSTEM_MENU_MODEL_H_
+#pragma once
+
+#include "base/basictypes.h"
+#include "base/compiler_specific.h"
+#include "ui/base/models/simple_menu_model.h"
+
+// A SimpleMenuModel subclass that allows the system menu for a window to be
+// wrapped.
+class SystemMenuModel : public ui::SimpleMenuModel {
+ public:
+ explicit SystemMenuModel(ui::SimpleMenuModel::Delegate* delegate);
+ virtual ~SystemMenuModel();
+
+ // Overridden from ui::MenuModel:
+ virtual int GetFirstItemIndex(gfx::NativeMenu native_menu) const OVERRIDE;
+
+ protected:
+ // Overridden from ui::SimpleMenuModel:
+ virtual int FlipIndex(int index) const OVERRIDE;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(SystemMenuModel);
+};
+
+#endif // CHROME_BROWSER_UI_VIEWS_FRAME_SYSTEM_MENU_MODEL_H_
« no previous file with comments | « chrome/browser/ui/views/frame/browser_frame_win.cc ('k') | chrome/browser/ui/views/frame/system_menu_model.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698