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

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

Issue 12036075: alternate ntp: fix website page jankiness when suggestions show and top bars are hidden (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: remove redundant param Created 7 years, 11 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) 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_INFOBAR_CONTAINER_GTK_H_ 5 #ifndef CHROME_BROWSER_UI_GTK_INFOBARS_INFOBAR_CONTAINER_GTK_H_
6 #define CHROME_BROWSER_UI_GTK_INFOBARS_INFOBAR_CONTAINER_GTK_H_ 6 #define CHROME_BROWSER_UI_GTK_INFOBARS_INFOBAR_CONTAINER_GTK_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 20 matching lines...) Expand all
31 // Due to how X11/GTK+ works, this class owns the methods to draw arrows on top 31 // Due to how X11/GTK+ works, this class owns the methods to draw arrows on top
32 // of other widgets. Since most bars in the top of the window have their own 32 // of other widgets. Since most bars in the top of the window have their own
33 // event boxes, we can't just draw over the coordinates in the toplevel window 33 // event boxes, we can't just draw over the coordinates in the toplevel window
34 // as event boxes get their own canvases (and they need to have their own event 34 // as event boxes get their own canvases (and they need to have their own event
35 // boxes for a mixture of handling mouse events and themeing). And because they 35 // boxes for a mixture of handling mouse events and themeing). And because they
36 // have their own event boxes and event boxes can't be partially transparent, 36 // have their own event boxes and event boxes can't be partially transparent,
37 // we can't just overlap the widgets. 37 // we can't just overlap the widgets.
38 class InfoBarContainerGtk : public InfoBarContainer { 38 class InfoBarContainerGtk : public InfoBarContainer {
39 public: 39 public:
40 InfoBarContainerGtk(InfoBarContainer::Delegate* delegate, 40 InfoBarContainerGtk(InfoBarContainer::Delegate* delegate,
41 chrome::search::SearchModel* search_model, 41 chrome::search::SearchModel* search_model,
dhollowa 2013/01/25 21:24:08 const chrome::search::SearchModel* search_model,
kuan 2013/01/29 00:17:08 per discussion, this won't be a const.
42 InstantModel* instant_model,
dhollowa 2013/01/25 21:24:08 const InstantModel* instant_model,
kuan 2013/01/29 00:17:08 per discussion, this shouldn't be a const, but for
42 Profile* profile); 43 Profile* profile);
43 virtual ~InfoBarContainerGtk(); 44 virtual ~InfoBarContainerGtk();
44 45
45 // Get the native widget. 46 // Get the native widget.
46 GtkWidget* widget() const { return container_.get(); } 47 GtkWidget* widget() const { return container_.get(); }
47 48
48 // Remove the specified InfoBarDelegate from the selected WebContents. This 49 // Remove the specified InfoBarDelegate from the selected WebContents. This
49 // will notify us back and cause us to close the View. This is called from 50 // will notify us back and cause us to close the View. This is called from
50 // the InfoBar's close button handler. 51 // the InfoBar's close button handler.
51 void RemoveDelegate(InfoBarDelegate* delegate); 52 void RemoveDelegate(InfoBarDelegate* delegate);
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 // which InfoBarGtk supplies information about drawing the arrows. 87 // which InfoBarGtk supplies information about drawing the arrows.
87 std::vector<InfoBarGtk*> infobars_gtk_; 88 std::vector<InfoBarGtk*> infobars_gtk_;
88 89
89 // VBox that holds the info bars. 90 // VBox that holds the info bars.
90 ui::OwnedWidgetGtk container_; 91 ui::OwnedWidgetGtk container_;
91 92
92 DISALLOW_COPY_AND_ASSIGN(InfoBarContainerGtk); 93 DISALLOW_COPY_AND_ASSIGN(InfoBarContainerGtk);
93 }; 94 };
94 95
95 #endif // CHROME_BROWSER_UI_GTK_INFOBARS_INFOBAR_CONTAINER_GTK_H_ 96 #endif // CHROME_BROWSER_UI_GTK_INFOBARS_INFOBAR_CONTAINER_GTK_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698