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

Side by Side Diff: chrome/browser/views/extensions/extension_shelf.h

Issue 215017: Fix extension toolstrip background update code (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 3 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) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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_VIEWS_EXTENSIONS_EXTENSION_SHELF_H_ 5 #ifndef CHROME_BROWSER_VIEWS_EXTENSIONS_EXTENSION_SHELF_H_
6 #define CHROME_BROWSER_VIEWS_EXTENSIONS_EXTENSION_SHELF_H_ 6 #define CHROME_BROWSER_VIEWS_EXTENSIONS_EXTENSION_SHELF_H_
7 7
8 #include "app/gfx/canvas.h" 8 #include "app/gfx/canvas.h"
9 #include "app/slide_animation.h" 9 #include "app/slide_animation.h"
10 #include "base/task.h" 10 #include "base/task.h"
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 void DropExtension(Toolstrip* handle, const gfx::Point& pt, bool cancel); 92 void DropExtension(Toolstrip* handle, const gfx::Point& pt, bool cancel);
93 93
94 // Expand the specified toolstrip, navigating to |url| if non-empty, 94 // Expand the specified toolstrip, navigating to |url| if non-empty,
95 // and setting the |height|. 95 // and setting the |height|.
96 void ExpandToolstrip(ExtensionHost* host, const GURL& url, int height); 96 void ExpandToolstrip(ExtensionHost* host, const GURL& url, int height);
97 97
98 // Collapse the specified toolstrip, navigating to |url| if non-empty. 98 // Collapse the specified toolstrip, navigating to |url| if non-empty.
99 void CollapseToolstrip(ExtensionHost* host, const GURL& url); 99 void CollapseToolstrip(ExtensionHost* host, const GURL& url);
100 100
101 // Initializes the background bitmaps for all views. 101 // Initializes the background bitmaps for all views.
102 void InitBackground(gfx::Canvas* canvas, const SkRect& subset); 102 void InitBackground(gfx::Canvas* canvas);
103 103
104 // Returns the Toolstrip at |x| coordinate. If |x| is out of bounds, returns 104 // Returns the Toolstrip at |x| coordinate. If |x| is out of bounds, returns
105 // NULL. 105 // NULL.
106 Toolstrip* ToolstripAtX(int x); 106 Toolstrip* ToolstripAtX(int x);
107 107
108 // Returns the Toolstrip at |index|. 108 // Returns the Toolstrip at |index|.
109 Toolstrip* ToolstripAtIndex(int index); 109 Toolstrip* ToolstripAtIndex(int index);
110 110
111 // Returns the toolstrip associated with |view|. 111 // Returns the toolstrip associated with |view|.
112 Toolstrip* ToolstripForView(ExtensionView* view); 112 Toolstrip* ToolstripForView(ExtensionView* view);
(...skipping 12 matching lines...) Expand all
125 125
126 // Returns whether the extension shelf is being displayed over the new tab 126 // Returns whether the extension shelf is being displayed over the new tab
127 // page. 127 // page.
128 bool OnNewTabPage() const; 128 bool OnNewTabPage() const;
129 129
130 NotificationRegistrar registrar_; 130 NotificationRegistrar registrar_;
131 131
132 // Background bitmap to draw under extension views. 132 // Background bitmap to draw under extension views.
133 bool background_needs_repaint_; 133 bool background_needs_repaint_;
134 134
135 // Whether the background we are remembering is for detached mode or not.
136 // This allows us to switch backgrounds and remember if we've done so, so that
137 // we don't have to do it over and over again.
138 bool background_for_detached_;
139
140 // The browser this extension shelf belongs to. 135 // The browser this extension shelf belongs to.
141 Browser* browser_; 136 Browser* browser_;
142 137
143 // The model representing the toolstrips on the shelf. 138 // The model representing the toolstrips on the shelf.
144 ExtensionShelfModel* model_; 139 ExtensionShelfModel* model_;
145 140
146 // Storage of strings needed for accessibility. 141 // Storage of strings needed for accessibility.
147 std::wstring accessible_name_; 142 std::wstring accessible_name_;
148 143
149 // Animation controlling showing and hiding of the shelf. 144 // Animation controlling showing and hiding of the shelf.
150 scoped_ptr<SlideAnimation> size_animation_; 145 scoped_ptr<SlideAnimation> size_animation_;
151 146
152 DISALLOW_COPY_AND_ASSIGN(ExtensionShelf); 147 DISALLOW_COPY_AND_ASSIGN(ExtensionShelf);
153 }; 148 };
154 149
155 #endif // CHROME_BROWSER_VIEWS_EXTENSIONS_EXTENSION_SHELF_H_ 150 #endif // CHROME_BROWSER_VIEWS_EXTENSIONS_EXTENSION_SHELF_H_
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_browsertests_misc.cc ('k') | chrome/browser/views/extensions/extension_shelf.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698