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

Side by Side Diff: chrome/browser/ui/panels/overflow_panel_strip.h

Issue 9546001: Support detaching/attaching panels via inter-strip drags. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Patch to land Created 8 years, 9 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_PANELS_OVERFLOW_PANEL_STRIP_H_ 5 #ifndef CHROME_BROWSER_UI_PANELS_OVERFLOW_PANEL_STRIP_H_
6 #define CHROME_BROWSER_UI_PANELS_OVERFLOW_PANEL_STRIP_H_ 6 #define CHROME_BROWSER_UI_PANELS_OVERFLOW_PANEL_STRIP_H_
7 #pragma once 7 #pragma once
8 8
9 #include <vector> 9 #include <vector>
10 #include "chrome/browser/ui/panels/panel.h" 10 #include "chrome/browser/ui/panels/panel.h"
(...skipping 14 matching lines...) Expand all
25 public ui::AnimationDelegate { 25 public ui::AnimationDelegate {
26 public: 26 public:
27 typedef std::vector<Panel*> Panels; 27 typedef std::vector<Panel*> Panels;
28 28
29 explicit OverflowPanelStrip(PanelManager* panel_manager); 29 explicit OverflowPanelStrip(PanelManager* panel_manager);
30 virtual ~OverflowPanelStrip(); 30 virtual ~OverflowPanelStrip();
31 31
32 // PanelStrip OVERRIDES: 32 // PanelStrip OVERRIDES:
33 virtual void SetDisplayArea(const gfx::Rect& display_area) OVERRIDE; 33 virtual void SetDisplayArea(const gfx::Rect& display_area) OVERRIDE;
34 virtual void RefreshLayout() OVERRIDE; 34 virtual void RefreshLayout() OVERRIDE;
35 virtual void AddPanel(Panel* panel) OVERRIDE; 35 virtual void AddPanel(Panel* panel,
36 PositioningMask positioning_mask) OVERRIDE;
36 virtual void RemovePanel(Panel* panel) OVERRIDE; 37 virtual void RemovePanel(Panel* panel) OVERRIDE;
37 virtual void CloseAll() OVERRIDE; 38 virtual void CloseAll() OVERRIDE;
38 virtual void ResizePanelWindow( 39 virtual void ResizePanelWindow(
39 Panel* panel, 40 Panel* panel,
40 const gfx::Size& preferred_window_size) OVERRIDE; 41 const gfx::Size& preferred_window_size) OVERRIDE;
41 virtual void OnPanelAttentionStateChanged(Panel* panel) OVERRIDE; 42 virtual void OnPanelAttentionStateChanged(Panel* panel) OVERRIDE;
42 virtual void ActivatePanel(Panel* panel) OVERRIDE; 43 virtual void ActivatePanel(Panel* panel) OVERRIDE;
43 virtual void MinimizePanel(Panel* panel) OVERRIDE; 44 virtual void MinimizePanel(Panel* panel) OVERRIDE;
44 virtual void RestorePanel(Panel* panel) OVERRIDE; 45 virtual void RestorePanel(Panel* panel) OVERRIDE;
45 virtual bool IsPanelMinimized(const Panel* panel) const OVERRIDE; 46 virtual bool IsPanelMinimized(const Panel* panel) const OVERRIDE;
46 virtual bool CanShowPanelAsActive(const Panel* panel) const OVERRIDE; 47 virtual bool CanShowPanelAsActive(const Panel* panel) const OVERRIDE;
48 virtual void SavePanelPlacement(Panel* panel) OVERRIDE;
49 virtual void RestorePanelToSavedPlacement() OVERRIDE;
50 virtual void DiscardSavedPanelPlacement() OVERRIDE;
47 virtual bool CanDragPanel(const Panel* panel) const OVERRIDE; 51 virtual bool CanDragPanel(const Panel* panel) const OVERRIDE;
48 virtual void StartDraggingPanel(Panel* panel) OVERRIDE; 52 virtual void StartDraggingPanelWithinStrip(Panel* panel) OVERRIDE;
49 virtual void DragPanel(Panel* panel, int delta_x, int delta_y) OVERRIDE; 53 virtual void DragPanelWithinStrip(Panel* panel,
50 virtual void EndDraggingPanel(Panel* panel, bool cancelled) OVERRIDE; 54 int delta_x,
55 int delta_y) OVERRIDE;
56 virtual void EndDraggingPanelWithinStrip(Panel* panel,
57 bool aborted) OVERRIDE;
51 58
52 void OnFullScreenModeChanged(bool is_full_screen); 59 void OnFullScreenModeChanged(bool is_full_screen);
53 60
54 int num_panels() const { return static_cast<int>(panels_.size()); } 61 int num_panels() const { return static_cast<int>(panels_.size()); }
55 Panel* first_panel() const { 62 Panel* first_panel() const {
56 return panels_.empty() ? NULL : panels_.front(); 63 return panels_.empty() ? NULL : panels_.front();
57 } 64 }
58 const Panels& panels() const { return panels_; } 65 const Panels& panels() const { return panels_; }
59 66
60 #ifdef UNIT_TEST 67 #ifdef UNIT_TEST
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 int overflow_hover_animator_start_width_; 149 int overflow_hover_animator_start_width_;
143 int overflow_hover_animator_end_width_; 150 int overflow_hover_animator_end_width_;
144 151
145 // Invalid panel index. 152 // Invalid panel index.
146 static const size_t kInvalidPanelIndex = static_cast<size_t>(-1); 153 static const size_t kInvalidPanelIndex = static_cast<size_t>(-1);
147 154
148 DISALLOW_COPY_AND_ASSIGN(OverflowPanelStrip); 155 DISALLOW_COPY_AND_ASSIGN(OverflowPanelStrip);
149 }; 156 };
150 157
151 #endif // CHROME_BROWSER_UI_PANELS_OVERFLOW_PANEL_STRIP_H_ 158 #endif // CHROME_BROWSER_UI_PANELS_OVERFLOW_PANEL_STRIP_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/panels/native_panel.h ('k') | chrome/browser/ui/panels/overflow_panel_strip.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698