Home | History | Annotate | Download | only in cocoa
      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
      3 // found in the LICENSE file.
      4 
      5 #ifndef CHROME_BROWSER_UI_COCOA_MAIN_MENU_ITEM_H_
      6 #define CHROME_BROWSER_UI_COCOA_MAIN_MENU_ITEM_H_
      7 
      8 // This interface is implemented by top-level main menubar items that need to
      9 // be dynamically updated based on the profile. The C++ bridge should implement
     10 // this interface so that the AppController can appropriately manage the
     11 // bridge's lifetime and profile information.
     12 class MainMenuItem {
     13  public:
     14   // Resets the menu to its initial state. This is called before the Item is
     15   // destructed and recreated.
     16   virtual void ResetMenu() = 0;
     17 
     18   // Forces a rebuild of the menu as if the model had changed.
     19   virtual void BuildMenu() = 0;
     20 
     21  protected:
     22   virtual ~MainMenuItem() {}
     23 };
     24 
     25 #endif  // CHROME_BROWSER_UI_COCOA_MAIN_MENU_ITEM_H_
     26