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

Side by Side Diff: chrome/browser/ui/views/infobars/infobar_view.h

Issue 250943008: Move enum MenuAnchorPosition to reduce deps on menu_item_view.h (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix indent Created 6 years, 7 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 CHROME_BROWSER_UI_VIEWS_INFOBARS_INFOBAR_VIEW_H_ 5 #ifndef CHROME_BROWSER_UI_VIEWS_INFOBARS_INFOBAR_VIEW_H_
6 #define CHROME_BROWSER_UI_VIEWS_INFOBARS_INFOBAR_VIEW_H_ 6 #define CHROME_BROWSER_UI_VIEWS_INFOBARS_INFOBAR_VIEW_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "components/infobars/core/infobar.h" 10 #include "components/infobars/core/infobar.h"
11 #include "components/infobars/core/infobar_container.h" 11 #include "components/infobars/core/infobar_container.h"
12 #include "third_party/skia/include/core/SkPath.h" 12 #include "third_party/skia/include/core/SkPath.h"
13 #include "ui/views/controls/button/button.h" 13 #include "ui/views/controls/button/button.h"
14 #include "ui/views/controls/menu/menu_item_view.h" 14 #include "ui/views/controls/menu/menu_types.h"
15 #include "ui/views/focus/external_focus_tracker.h" 15 #include "ui/views/focus/external_focus_tracker.h"
16 16
17 namespace ui { 17 namespace ui {
18 class MenuModel; 18 class MenuModel;
19 } 19 }
20 20
21 namespace views { 21 namespace views {
22 class ImageButton; 22 class ImageButton;
23 class ImageView; 23 class ImageView;
24 class Label; 24 class Label;
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 int OffsetY(views::View* view) const; 100 int OffsetY(views::View* view) const;
101 101
102 // Convenience getter. 102 // Convenience getter.
103 const infobars::InfoBarContainer::Delegate* container_delegate() const; 103 const infobars::InfoBarContainer::Delegate* container_delegate() const;
104 104
105 // Shows a menu at the specified position. 105 // Shows a menu at the specified position.
106 // NOTE: This must not be called if we're unowned. (Subclasses should ignore 106 // NOTE: This must not be called if we're unowned. (Subclasses should ignore
107 // calls to RunMenu() in this case.) 107 // calls to RunMenu() in this case.)
108 void RunMenuAt(ui::MenuModel* menu_model, 108 void RunMenuAt(ui::MenuModel* menu_model,
109 views::MenuButton* button, 109 views::MenuButton* button,
110 views::MenuItemView::AnchorPosition anchor); 110 views::MenuAnchorPosition anchor);
111 111
112 private: 112 private:
113 // Does the actual work for AssignWidths(). Assumes |labels| is sorted by 113 // Does the actual work for AssignWidths(). Assumes |labels| is sorted by
114 // decreasing preferred width. 114 // decreasing preferred width.
115 static void AssignWidthsSorted(Labels* labels, int available_width); 115 static void AssignWidthsSorted(Labels* labels, int available_width);
116 116
117 // InfoBar: 117 // InfoBar:
118 virtual void PlatformSpecificShow(bool animate) OVERRIDE; 118 virtual void PlatformSpecificShow(bool animate) OVERRIDE;
119 virtual void PlatformSpecificHide(bool animate) OVERRIDE; 119 virtual void PlatformSpecificHide(bool animate) OVERRIDE;
120 virtual void PlatformSpecificOnHeightsRecalculated() OVERRIDE; 120 virtual void PlatformSpecificOnHeightsRecalculated() OVERRIDE;
(...skipping 18 matching lines...) Expand all
139 SkPath fill_path_; 139 SkPath fill_path_;
140 SkPath stroke_path_; 140 SkPath stroke_path_;
141 141
142 // Used to run the menu. 142 // Used to run the menu.
143 scoped_ptr<views::MenuRunner> menu_runner_; 143 scoped_ptr<views::MenuRunner> menu_runner_;
144 144
145 DISALLOW_COPY_AND_ASSIGN(InfoBarView); 145 DISALLOW_COPY_AND_ASSIGN(InfoBarView);
146 }; 146 };
147 147
148 #endif // CHROME_BROWSER_UI_VIEWS_INFOBARS_INFOBAR_VIEW_H_ 148 #endif // CHROME_BROWSER_UI_VIEWS_INFOBARS_INFOBAR_VIEW_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/infobars/extension_infobar.cc ('k') | chrome/browser/ui/views/infobars/infobar_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698