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

Unified Diff: chrome/browser/views/extensions/extension_shelf.h

Issue 175017: Experiment with dislodging the Extension Shelf and having it only appear on t... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/tab_contents/tab_contents.cc ('k') | chrome/browser/views/extensions/extension_shelf.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/views/extensions/extension_shelf.h
===================================================================
--- chrome/browser/views/extensions/extension_shelf.h (revision 24842)
+++ chrome/browser/views/extensions/extension_shelf.h (working copy)
@@ -6,6 +6,7 @@
#define CHROME_BROWSER_VIEWS_EXTENSIONS_EXTENSION_SHELF_H_
#include "app/gfx/canvas.h"
+#include "app/slide_animation.h"
#include "base/task.h"
#include "chrome/browser/extensions/extension_shelf_model.h"
#include "chrome/browser/extensions/extensions_service.h"
@@ -21,7 +22,9 @@
// A shelf that contains Extension toolstrips.
class ExtensionShelf : public views::View,
public ExtensionContainer,
- public ExtensionShelfModelObserver {
+ public ExtensionShelfModelObserver,
+ public AnimationDelegate,
+ public NotificationObserver {
public:
explicit ExtensionShelf(Browser* browser);
virtual ~ExtensionShelf();
@@ -29,6 +32,12 @@
// Get the current model.
ExtensionShelfModel* model() { return model_; }
+ // Returns whether the extension shelf is detached from the Chrome frame.
+ bool IsDetachedStyle();
+
+ // Toggles a preference for whether to always show the extension shelf.
+ static void ToggleWhenExtensionShelfVisible(Profile* profile);
+
// View
virtual void Paint(gfx::Canvas* canvas);
virtual gfx::Size GetPreferredSize();
@@ -55,6 +64,15 @@
virtual void ShelfModelReloaded();
virtual void ShelfModelDeleting();
+ // AnimationDelegate
+ virtual void AnimationProgressed(const Animation* animation);
+ virtual void AnimationEnded(const Animation* animation);
+
+ // NotificationObserver
+ virtual void Observe(NotificationType type,
+ const NotificationSource& source,
+ const NotificationDetails& details);
+
protected:
// View
virtual void ChildPreferredSizeChanged(View* child);
@@ -90,15 +108,30 @@
// Loads initial state from |model_|.
void LoadFromModel();
+ // Returns whether the extension shelf always shown (checks pref value).
+ bool IsAlwaysShown();
+
+ // Returns whether the extension shelf is being displayed over the new tab
+ // page.
+ bool OnNewTabPage();
+
+ NotificationRegistrar registrar_;
+
// Background bitmap to draw under extension views.
SkBitmap background_;
+ // The browser this extension shelf belongs to.
+ Browser* browser_;
+
// The model representing the toolstrips on the shelf.
ExtensionShelfModel* model_;
// Storage of strings needed for accessibility.
std::wstring accessible_name_;
+ // Animation controlling showing and hiding of the shelf.
+ scoped_ptr<SlideAnimation> size_animation_;
+
DISALLOW_COPY_AND_ASSIGN(ExtensionShelf);
};
« no previous file with comments | « chrome/browser/tab_contents/tab_contents.cc ('k') | chrome/browser/views/extensions/extension_shelf.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698