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

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

Issue 4767001: Make TabContents own its infobar delegates.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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_GTK_EXTENSION_INFOBAR_GTK_H_ 5 #ifndef CHROME_BROWSER_GTK_EXTENSION_INFOBAR_GTK_H_
6 #define CHROME_BROWSER_GTK_EXTENSION_INFOBAR_GTK_H_ 6 #define CHROME_BROWSER_GTK_EXTENSION_INFOBAR_GTK_H_
7 #pragma once 7 #pragma once
8 8
9 #include <gtk/gtk.h> 9 #include <gtk/gtk.h>
10 10
11 #include "chrome/browser/gtk/extension_view_gtk.h" 11 #include "chrome/browser/gtk/extension_view_gtk.h"
12 #include "chrome/browser/gtk/infobar_gtk.h" 12 #include "chrome/browser/gtk/infobar_gtk.h"
13 #include "chrome/browser/extensions/extension_infobar_delegate.h" 13 #include "chrome/browser/extensions/extension_infobar_delegate.h"
14 #include "chrome/browser/extensions/image_loading_tracker.h" 14 #include "chrome/browser/extensions/image_loading_tracker.h"
15 #include "gfx/gtk_util.h" 15 #include "gfx/gtk_util.h"
16 16
17 class ExtensionInfobarDelegate; 17 class ExtensionInfobarDelegate;
18 class ExtensionResource; 18 class ExtensionResource;
19 class ExtensionViewGtk; 19 class ExtensionViewGtk;
20 20
21 class ExtensionInfoBarGtk : public InfoBar, 21 class ExtensionInfoBarGtk : public InfoBar,
22 public ImageLoadingTracker::Observer, 22 public ImageLoadingTracker::Observer,
23 public ExtensionViewGtk::Container { 23 public ExtensionViewGtk::Container {
24 public: 24 public:
25 explicit ExtensionInfoBarGtk(ExtensionInfoBarDelegate* delegate); 25 explicit ExtensionInfoBarGtk(ExtensionInfoBarDelegate* delegate);
26 virtual ~ExtensionInfoBarGtk(); 26 virtual ~ExtensionInfoBarGtk();
27 27
28 // Overridden from ImageLoadingTracker::Observer: 28 // Overridden from ImageLoadingTracker::Observer:
29 virtual void OnImageLoaded( 29 virtual void OnImageLoaded(SkBitmap* image,
30 SkBitmap* image, ExtensionResource resource, int index); 30 ExtensionResource resource,
31 int index);
31 32
32 // ExtensionViewGtk::Container implementation 33 // ExtensionViewGtk::Container implementation
33 virtual void OnExtensionPreferredSizeChanged(ExtensionViewGtk* view, 34 virtual void OnExtensionPreferredSizeChanged(ExtensionViewGtk* view,
34 const gfx::Size& new_size); 35 const gfx::Size& new_size);
35 36
36 private: 37 private:
37 // Build the widgets of the Infobar. 38 // Build the widgets of the Infobar.
38 void BuildWidgets(); 39 void BuildWidgets();
39 40
40 CHROMEGTK_CALLBACK_1(ExtensionInfoBarGtk, void, OnSizeAllocate, 41 CHROMEGTK_CALLBACK_1(ExtensionInfoBarGtk, void, OnSizeAllocate,
41 GtkAllocation*); 42 GtkAllocation*);
42 43
43 ImageLoadingTracker tracker_; 44 ImageLoadingTracker tracker_;
44 45
45 ExtensionInfoBarDelegate* delegate_;
46
47 ExtensionViewGtk* view_; 46 ExtensionViewGtk* view_;
48 47
49 DISALLOW_COPY_AND_ASSIGN(ExtensionInfoBarGtk); 48 DISALLOW_COPY_AND_ASSIGN(ExtensionInfoBarGtk);
50 }; 49 };
51 50
52 #endif // CHROME_BROWSER_GTK_EXTENSION_INFOBAR_GTK_H_ 51 #endif // CHROME_BROWSER_GTK_EXTENSION_INFOBAR_GTK_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698