Revert of Add button to add new FSP services to Files app. (patchset #8 id:140001...
[chromium-blink-merge.git] / chrome / browser / ui / views / frame / system_menu_model_builder.h
blobd12dc336cc6e0deb88995047c814b4e6def2c1d0
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_UI_VIEWS_FRAME_SYSTEM_MENU_MODEL_BUILDER_H_
6 #define CHROME_BROWSER_UI_VIEWS_FRAME_SYSTEM_MENU_MODEL_BUILDER_H_
8 #include "base/memory/scoped_ptr.h"
9 #include "chrome/browser/ui/views/frame/system_menu_model_delegate.h"
11 class Browser;
12 class EncodingMenuModel;
13 class ZoomMenuModel;
15 namespace ui {
16 class AcceleratorProvider;
17 class MenuModel;
18 class SimpleMenuModel;
21 // SystemMenuModelBuilder is responsible for building and owning the system menu
22 // model.
23 class SystemMenuModelBuilder {
24 public:
25 SystemMenuModelBuilder(ui::AcceleratorProvider* provider, Browser* browser);
26 ~SystemMenuModelBuilder();
28 // Populates the menu.
29 void Init();
31 // Returns the menu model. SystemMenuModelBuilder owns the returned model.
32 ui::MenuModel* menu_model() { return menu_model_.get(); }
34 private:
35 Browser* browser() { return menu_delegate_.browser(); }
37 // Populates |model| with the appropriate contents.
38 void BuildMenu(ui::SimpleMenuModel* model);
39 void BuildSystemMenuForBrowserWindow(ui::SimpleMenuModel* model);
40 void BuildSystemMenuForAppOrPopupWindow(ui::SimpleMenuModel* model);
42 // Adds items for toggling the frame type (if necessary).
43 void AddFrameToggleItems(ui::SimpleMenuModel* model);
45 // Add the items to allow the window to visit the desktop of another user.
46 void AppendTeleportMenu(ui::SimpleMenuModel* model);
48 SystemMenuModelDelegate menu_delegate_;
49 scoped_ptr<ui::MenuModel> menu_model_;
50 scoped_ptr<ZoomMenuModel> zoom_menu_contents_;
51 scoped_ptr<EncodingMenuModel> encoding_menu_contents_;
53 DISALLOW_COPY_AND_ASSIGN(SystemMenuModelBuilder);
56 #endif // CHROME_BROWSER_UI_VIEWS_FRAME_SYSTEM_MENU_MODEL_BUILDER_H_