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

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

Issue 273223002: views: Make view::Views::GetPreferredSize() const. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: More compile fix for ToT 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_EXTENSION_INFOBAR_H_ 5 #ifndef CHROME_BROWSER_UI_VIEWS_INFOBARS_EXTENSION_INFOBAR_H_
6 #define CHROME_BROWSER_UI_VIEWS_INFOBARS_EXTENSION_INFOBAR_H_ 6 #define CHROME_BROWSER_UI_VIEWS_INFOBARS_EXTENSION_INFOBAR_H_
7 7
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "chrome/browser/ui/views/infobars/infobar_view.h" 9 #include "chrome/browser/ui/views/infobars/infobar_view.h"
10 #include "ui/views/controls/button/menu_button_listener.h" 10 #include "ui/views/controls/button/menu_button_listener.h"
(...skipping 12 matching lines...) Expand all
23 ExtensionInfoBar(scoped_ptr<ExtensionInfoBarDelegate> delegate, 23 ExtensionInfoBar(scoped_ptr<ExtensionInfoBarDelegate> delegate,
24 Browser* browser); 24 Browser* browser);
25 25
26 private: 26 private:
27 virtual ~ExtensionInfoBar(); 27 virtual ~ExtensionInfoBar();
28 28
29 // InfoBarView: 29 // InfoBarView:
30 virtual void Layout() OVERRIDE; 30 virtual void Layout() OVERRIDE;
31 virtual void ViewHierarchyChanged( 31 virtual void ViewHierarchyChanged(
32 const ViewHierarchyChangedDetails& details) OVERRIDE; 32 const ViewHierarchyChangedDetails& details) OVERRIDE;
33 virtual int ContentMinimumWidth() OVERRIDE; 33 virtual int ContentMinimumWidth() const OVERRIDE;
34 34
35 // views::MenuButtonListener: 35 // views::MenuButtonListener:
36 virtual void OnMenuButtonClicked(views::View* source, 36 virtual void OnMenuButtonClicked(views::View* source,
37 const gfx::Point& point) OVERRIDE; 37 const gfx::Point& point) OVERRIDE;
38 38
39 void OnImageLoaded(const gfx::Image& image); 39 void OnImageLoaded(const gfx::Image& image);
40 ExtensionInfoBarDelegate* GetDelegate(); 40 ExtensionInfoBarDelegate* GetDelegate();
41 const ExtensionInfoBarDelegate* GetDelegate() const;
41 42
42 // Returns the width of all content other than the extension view. Layout() 43 // Returns the width of all content other than the extension view. Layout()
43 // uses this to determine how much space the extension view can take. 44 // uses this to determine how much space the extension view can take.
44 int NonExtensionViewWidth() const; 45 int NonExtensionViewWidth() const;
45 46
46 Browser* browser_; 47 Browser* browser_;
47 48
48 // The infobar icon used for the extension infobar. The icon can be either a 49 // The infobar icon used for the extension infobar. The icon can be either a
49 // plain image (in which case |icon_as_image_| is set) or a dropdown menu (in 50 // plain image (in which case |icon_as_image_| is set) or a dropdown menu (in
50 // which case |icon_as_menu_| is set). 51 // which case |icon_as_menu_| is set).
(...skipping 10 matching lines...) Expand all
61 // It is non-NULL if |infobar_icon_| is an image and in that case 62 // It is non-NULL if |infobar_icon_| is an image and in that case
62 // |icon_as_image_ == infobar_icon_|. 63 // |icon_as_image_ == infobar_icon_|.
63 views::ImageView* icon_as_image_; 64 views::ImageView* icon_as_image_;
64 65
65 base::WeakPtrFactory<ExtensionInfoBar> weak_ptr_factory_; 66 base::WeakPtrFactory<ExtensionInfoBar> weak_ptr_factory_;
66 67
67 DISALLOW_COPY_AND_ASSIGN(ExtensionInfoBar); 68 DISALLOW_COPY_AND_ASSIGN(ExtensionInfoBar);
68 }; 69 };
69 70
70 #endif // CHROME_BROWSER_UI_VIEWS_INFOBARS_EXTENSION_INFOBAR_H_ 71 #endif // CHROME_BROWSER_UI_VIEWS_INFOBARS_EXTENSION_INFOBAR_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/infobars/confirm_infobar.cc ('k') | chrome/browser/ui/views/infobars/extension_infobar.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698