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

Side by Side Diff: views/controls/menu/menu_item_view.h

Issue 7491083: Implemented nicer battery status (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Review fix 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « views/controls/menu/menu_controller.h ('k') | views/controls/menu/menu_item_view.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 VIEWS_CONTROLS_MENU_MENU_ITEM_VIEW_H_ 5 #ifndef VIEWS_CONTROLS_MENU_MENU_ITEM_VIEW_H_
6 #define VIEWS_CONTROLS_MENU_MENU_ITEM_VIEW_H_ 6 #define VIEWS_CONTROLS_MENU_MENU_ITEM_VIEW_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after
327 // Set the position of the menu with respect to the bounds (top 327 // Set the position of the menu with respect to the bounds (top
328 // level only). 328 // level only).
329 void set_menu_position(MenuPosition menu_position) { 329 void set_menu_position(MenuPosition menu_position) {
330 requested_menu_position_ = menu_position; 330 requested_menu_position_ = menu_position;
331 } 331 }
332 332
333 protected: 333 protected:
334 // Creates a MenuItemView. This is used by the various AddXXX methods. 334 // Creates a MenuItemView. This is used by the various AddXXX methods.
335 MenuItemView(MenuItemView* parent, int command, Type type); 335 MenuItemView(MenuItemView* parent, int command, Type type);
336 336
337 virtual std::string GetClassName() const; 337 virtual void ChildPreferredSizeChanged(View* child) OVERRIDE;
338
339 virtual std::string GetClassName() const OVERRIDE;
338 340
339 private: 341 private:
340 // Calculates all sizes that we can from the OS. 342 // Calculates all sizes that we can from the OS.
341 // 343 //
342 // This is invoked prior to Running a menu. 344 // This is invoked prior to Running a menu.
343 static void UpdateMenuPartSizes(bool has_icons); 345 static void UpdateMenuPartSizes(bool has_icons);
344 346
345 // Called by the two constructors to initialize this menu item. 347 // Called by the two constructors to initialize this menu item.
346 void Init(MenuItemView* parent, 348 void Init(MenuItemView* parent,
347 int command, 349 int command,
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
490 // position of the menu being shown. 492 // position of the menu being shown.
491 MenuPosition requested_menu_position_; 493 MenuPosition requested_menu_position_;
492 MenuPosition actual_menu_position_; 494 MenuPosition actual_menu_position_;
493 495
494 DISALLOW_COPY_AND_ASSIGN(MenuItemView); 496 DISALLOW_COPY_AND_ASSIGN(MenuItemView);
495 }; 497 };
496 498
497 } // namespace views 499 } // namespace views
498 500
499 #endif // VIEWS_CONTROLS_MENU_MENU_ITEM_VIEW_H_ 501 #endif // VIEWS_CONTROLS_MENU_MENU_ITEM_VIEW_H_
OLDNEW
« no previous file with comments | « views/controls/menu/menu_controller.h ('k') | views/controls/menu/menu_item_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698