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

Side by Side Diff: chrome/browser/ui/gtk/infobars/extension_infobar_gtk.h

Issue 8632022: Add OVERRIDE to chrome/browser/ui/gtk/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 1 month 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) 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 CHROME_BROWSER_UI_GTK_INFOBARS_EXTENSION_INFOBAR_GTK_H_ 5 #ifndef CHROME_BROWSER_UI_GTK_INFOBARS_EXTENSION_INFOBAR_GTK_H_
6 #define CHROME_BROWSER_UI_GTK_INFOBARS_EXTENSION_INFOBAR_GTK_H_ 6 #define CHROME_BROWSER_UI_GTK_INFOBARS_EXTENSION_INFOBAR_GTK_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/compiler_specific.h"
9 #include "chrome/browser/extensions/extension_infobar_delegate.h" 10 #include "chrome/browser/extensions/extension_infobar_delegate.h"
10 #include "chrome/browser/extensions/image_loading_tracker.h" 11 #include "chrome/browser/extensions/image_loading_tracker.h"
11 #include "chrome/browser/ui/gtk/extensions/extension_view_gtk.h" 12 #include "chrome/browser/ui/gtk/extensions/extension_view_gtk.h"
12 #include "chrome/browser/ui/gtk/infobars/infobar_gtk.h" 13 #include "chrome/browser/ui/gtk/infobars/infobar_gtk.h"
13 #include "chrome/browser/ui/gtk/menu_gtk.h" 14 #include "chrome/browser/ui/gtk/menu_gtk.h"
14 #include "ui/gfx/gtk_util.h" 15 #include "ui/gfx/gtk_util.h"
15 16
16 class ExtensionResource; 17 class ExtensionResource;
17 class ExtensionViewGtk; 18 class ExtensionViewGtk;
18 class MenuGtk; 19 class MenuGtk;
19 20
20 class ExtensionInfoBarGtk : public InfoBarGtk, 21 class ExtensionInfoBarGtk : public InfoBarGtk,
21 public ImageLoadingTracker::Observer, 22 public ImageLoadingTracker::Observer,
22 public MenuGtk::Delegate { 23 public MenuGtk::Delegate {
23 public: 24 public:
24 ExtensionInfoBarGtk(InfoBarTabHelper* owner, 25 ExtensionInfoBarGtk(InfoBarTabHelper* owner,
25 ExtensionInfoBarDelegate* delegate); 26 ExtensionInfoBarDelegate* delegate);
26 virtual ~ExtensionInfoBarGtk(); 27 virtual ~ExtensionInfoBarGtk();
27 28
28 // Overridden from InfoBar (through InfoBarGtk): 29 // Overridden from InfoBar (through InfoBarGtk):
29 virtual void PlatformSpecificHide(bool animate); 30 virtual void PlatformSpecificHide(bool animate) OVERRIDE;
30 31
31 // Overridden from InfoBarGtk: 32 // Overridden from InfoBarGtk:
32 virtual void GetTopColor(InfoBarDelegate::Type type, 33 virtual void GetTopColor(InfoBarDelegate::Type type,
33 double* r, double* g, double* b); 34 double* r, double* g, double* b) OVERRIDE;
34 virtual void GetBottomColor(InfoBarDelegate::Type type, 35 virtual void GetBottomColor(InfoBarDelegate::Type type,
35 double* r, double* g, double* b); 36 double* r, double* g, double* b) OVERRIDE;
36 37
37 // Overridden from ImageLoadingTracker::Observer: 38 // Overridden from ImageLoadingTracker::Observer:
38 virtual void OnImageLoaded( 39 virtual void OnImageLoaded(
39 SkBitmap* image, const ExtensionResource& resource, int index); 40 SkBitmap* image, const ExtensionResource& resource, int index) OVERRIDE;
40 41
41 // Overridden from MenuGtk::Delegate: 42 // Overridden from MenuGtk::Delegate:
42 virtual void StoppedShowing(); 43 virtual void StoppedShowing() OVERRIDE;
43 44
44 private: 45 private:
45 // Build the widgets of the Infobar. 46 // Build the widgets of the Infobar.
46 void BuildWidgets(); 47 void BuildWidgets();
47 48
48 // Looks at the window the infobar is in and gets the browser. Can return 49 // Looks at the window the infobar is in and gets the browser. Can return
49 // NULL if we aren't attached. 50 // NULL if we aren't attached.
50 Browser* GetBrowser(); 51 Browser* GetBrowser();
51 52
52 // Returns the context menu model for this extension. Can be NULL if 53 // Returns the context menu model for this extension. Can be NULL if
(...skipping 24 matching lines...) Expand all
77 // An alignment with one pixel of bottom padding. This is set so the |view_| 78 // An alignment with one pixel of bottom padding. This is set so the |view_|
78 // doesn't overlap the bottom separator. This also makes it more convenient 79 // doesn't overlap the bottom separator. This also makes it more convenient
79 // to reattach the view since the alignment_ will have the |hbox_| packing 80 // to reattach the view since the alignment_ will have the |hbox_| packing
80 // child properties. Reparenting becomes easier too. 81 // child properties. Reparenting becomes easier too.
81 GtkWidget* alignment_; 82 GtkWidget* alignment_;
82 83
83 DISALLOW_COPY_AND_ASSIGN(ExtensionInfoBarGtk); 84 DISALLOW_COPY_AND_ASSIGN(ExtensionInfoBarGtk);
84 }; 85 };
85 86
86 #endif // CHROME_BROWSER_UI_GTK_INFOBARS_EXTENSION_INFOBAR_GTK_H_ 87 #endif // CHROME_BROWSER_UI_GTK_INFOBARS_EXTENSION_INFOBAR_GTK_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698