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

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

Issue 9546001: Support detaching/attaching panels via inter-strip drags. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix per feedback 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_PANEL_BROWSER_VIEW_H_ 5 #ifndef CHROME_BROWSER_UI_PANELS_PANEL_BROWSER_VIEW_H_
6 #define CHROME_BROWSER_UI_PANELS_PANEL_BROWSER_VIEW_H_ 6 #define CHROME_BROWSER_UI_PANELS_PANEL_BROWSER_VIEW_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/gtest_prod_util.h" 9 #include "base/gtest_prod_util.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 20 matching lines...) Expand all
31 virtual ~PanelBrowserView(); 31 virtual ~PanelBrowserView();
32 32
33 Panel* panel() const { return panel_.get(); } 33 Panel* panel() const { return panel_.get(); }
34 bool closed() const { return closed_; } 34 bool closed() const { return closed_; }
35 bool focused() const { return focused_; } 35 bool focused() const { return focused_; }
36 36
37 PanelBrowserFrameView* GetFrameView() const; 37 PanelBrowserFrameView* GetFrameView() const;
38 38
39 // Called from frame view when titlebar receives a mouse event. 39 // Called from frame view when titlebar receives a mouse event.
40 // Return true if the event is handled. 40 // Return true if the event is handled.
41 bool OnTitlebarMousePressed(const gfx::Point& location); 41 // |mouse_location| is in screen coordinates.
42 bool OnTitlebarMouseDragged(const gfx::Point& location); 42 bool OnTitlebarMousePressed(const gfx::Point& mouse_location);
43 bool OnTitlebarMouseDragged(const gfx::Point& mouse_location);
43 bool OnTitlebarMouseReleased(); 44 bool OnTitlebarMouseReleased();
44 bool OnTitlebarMouseCaptureLost(); 45 bool OnTitlebarMouseCaptureLost();
45 46
46 private: 47 private:
47 friend class NativePanelTestingWin; 48 friend class NativePanelTestingWin;
48 friend class PanelBrowserViewTest; 49 friend class PanelBrowserViewTest;
49 50
50 enum MouseDraggingState { 51 enum MouseDraggingState {
51 NO_DRAGGING, 52 NO_DRAGGING,
52 DRAGGING_STARTED, 53 DRAGGING_STARTED,
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 virtual gfx::Size WindowSizeFromContentSize( 115 virtual gfx::Size WindowSizeFromContentSize(
115 const gfx::Size& content_size) const OVERRIDE; 116 const gfx::Size& content_size) const OVERRIDE;
116 virtual gfx::Size ContentSizeFromWindowSize( 117 virtual gfx::Size ContentSizeFromWindowSize(
117 const gfx::Size& window_size) const OVERRIDE; 118 const gfx::Size& window_size) const OVERRIDE;
118 virtual int TitleOnlyHeight() const OVERRIDE; 119 virtual int TitleOnlyHeight() const OVERRIDE;
119 virtual Browser* GetPanelBrowser() const OVERRIDE; 120 virtual Browser* GetPanelBrowser() const OVERRIDE;
120 virtual void DestroyPanelBrowser() OVERRIDE; 121 virtual void DestroyPanelBrowser() OVERRIDE;
121 virtual gfx::Size IconOnlySize() const OVERRIDE; 122 virtual gfx::Size IconOnlySize() const OVERRIDE;
122 virtual void EnsurePanelFullyVisible() OVERRIDE; 123 virtual void EnsurePanelFullyVisible() OVERRIDE;
123 virtual void SetPanelAppIconVisibility(bool visible) OVERRIDE; 124 virtual void SetPanelAppIconVisibility(bool visible) OVERRIDE;
125 virtual void SetPanelAlwaysOnTop(bool on_top) OVERRIDE;
124 126
125 // Overridden from AnimationDelegate: 127 // Overridden from AnimationDelegate:
126 virtual void AnimationEnded(const ui::Animation* animation) OVERRIDE; 128 virtual void AnimationEnded(const ui::Animation* animation) OVERRIDE;
127 virtual void AnimationProgressed(const ui::Animation* animation) OVERRIDE; 129 virtual void AnimationProgressed(const ui::Animation* animation) OVERRIDE;
128 130
129 bool EndDragging(bool cancelled); 131 bool EndDragging(bool cancelled);
130 132
131 void SetBoundsInternal(const gfx::Rect& bounds, bool animate); 133 void SetBoundsInternal(const gfx::Rect& bounds, bool animate);
132 134
133 void ShowOrHidePanelAppIcon(bool show); 135 void ShowOrHidePanelAppIcon(bool show);
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 // The last view that had focus in the panel. This is saved so that focus can 171 // The last view that had focus in the panel. This is saved so that focus can
170 // be restored properly when a drag ends. 172 // be restored properly when a drag ends.
171 views::View* old_focused_view_; 173 views::View* old_focused_view_;
172 174
173 content::NotificationRegistrar registrar_; 175 content::NotificationRegistrar registrar_;
174 176
175 DISALLOW_COPY_AND_ASSIGN(PanelBrowserView); 177 DISALLOW_COPY_AND_ASSIGN(PanelBrowserView);
176 }; 178 };
177 179
178 #endif // CHROME_BROWSER_UI_PANELS_PANEL_BROWSER_VIEW_H_ 180 #endif // CHROME_BROWSER_UI_PANELS_PANEL_BROWSER_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698