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

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

Issue 7104067: Make PanelBrowserView derive from NativePanel. Also add some more methods to NativePanel. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 6 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
« no previous file with comments | « chrome/browser/ui/panels/native_panel.h ('k') | chrome/browser/ui/panels/panel_browser_view.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_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"
11 #include "chrome/browser/ui/panels/native_panel.h"
11 #include "chrome/browser/ui/views/frame/browser_view.h" 12 #include "chrome/browser/ui/views/frame/browser_view.h"
12 #include "ui/base/animation/animation_delegate.h" 13 #include "ui/base/animation/animation_delegate.h"
13 14
14 class Browser; 15 class Browser;
15 class Panel; 16 class Panel;
16 class PanelBrowserFrameView; 17 class PanelBrowserFrameView;
17 namespace ui { 18 namespace ui {
18 class SlideAnimation; 19 class SlideAnimation;
19 } 20 }
20 21
21 // A browser view that implements Panel specific behavior. 22 // A browser view that implements Panel specific behavior.
22 class PanelBrowserView : public ::BrowserView, 23 class PanelBrowserView : public BrowserView,
24 public NativePanel,
23 public ui::AnimationDelegate { 25 public ui::AnimationDelegate {
24 public: 26 public:
25 PanelBrowserView(Browser* browser, Panel* panel); 27 PanelBrowserView(Browser* browser, Panel* panel);
26 virtual ~PanelBrowserView(); 28 virtual ~PanelBrowserView();
27 29
28 Panel* panel() const { return panel_.get(); } 30 Panel* panel() const { return panel_.get(); }
29 bool closed() const { return closed_; } 31 bool closed() const { return closed_; }
30 32
31 // Called from frame view when title bar receives a mouse event. 33 // Called from frame view when title bar receives a mouse event.
32 // Return true if the event is handled. 34 // Return true if the event is handled.
(...skipping 16 matching lines...) Expand all
49 virtual bool GetSavedWindowBounds(gfx::Rect* bounds) const OVERRIDE; 51 virtual bool GetSavedWindowBounds(gfx::Rect* bounds) const OVERRIDE;
50 virtual void OnWindowActivationChanged(bool active) OVERRIDE; 52 virtual void OnWindowActivationChanged(bool active) OVERRIDE;
51 virtual bool AcceleratorPressed(const views::Accelerator& accelerator) 53 virtual bool AcceleratorPressed(const views::Accelerator& accelerator)
52 OVERRIDE; 54 OVERRIDE;
53 55
54 // Overridden from views::WidgetDelegate: 56 // Overridden from views::WidgetDelegate:
55 virtual void OnDisplayChanged() OVERRIDE; 57 virtual void OnDisplayChanged() OVERRIDE;
56 virtual void OnWorkAreaChanged() OVERRIDE; 58 virtual void OnWorkAreaChanged() OVERRIDE;
57 virtual bool WillProcessWorkAreaChange() const OVERRIDE; 59 virtual bool WillProcessWorkAreaChange() const OVERRIDE;
58 60
61 // Overridden from NativePanel:
62 virtual void ShowPanel() OVERRIDE;
63 virtual void SetPanelBounds(const gfx::Rect& bounds) OVERRIDE;
64 virtual void MinimizePanel() OVERRIDE;
65 virtual void RestorePanel() OVERRIDE;
66 virtual void ClosePanel() OVERRIDE;
67 virtual void ActivatePanel() OVERRIDE;
68 virtual void DeactivatePanel() OVERRIDE;
69 virtual bool IsPanelActive() const OVERRIDE;
70 virtual gfx::NativeWindow GetNativePanelHandle() OVERRIDE;
71 virtual void UpdatePanelTitleBar() OVERRIDE;
72 virtual void ShowTaskManagerForPanel() OVERRIDE;
73 virtual void NotifyPanelOnUserChangedTheme() OVERRIDE;
74 virtual void FlashPanelFrame() OVERRIDE;
75 virtual void DestroyPanelBrowser() OVERRIDE;
76
59 // Overridden from AnimationDelegate: 77 // Overridden from AnimationDelegate:
60 virtual void AnimationProgressed(const ui::Animation* animation) OVERRIDE; 78 virtual void AnimationProgressed(const ui::Animation* animation) OVERRIDE;
61 79
62 PanelBrowserFrameView* GetFrameView() const; 80 PanelBrowserFrameView* GetFrameView() const;
63 bool EndDragging(bool cancelled); 81 bool EndDragging(bool cancelled);
64 82
65 scoped_ptr<Panel> panel_; 83 scoped_ptr<Panel> panel_;
66 84
67 // Is the panel being closed? Do not use it when it is closed. 85 // Is the panel being closed? Do not use it when it is closed.
68 bool closed_; 86 bool closed_;
(...skipping 10 matching lines...) Expand all
79 97
80 // Used to animate the bounds change. 98 // Used to animate the bounds change.
81 scoped_ptr<ui::SlideAnimation> bounds_animator_; 99 scoped_ptr<ui::SlideAnimation> bounds_animator_;
82 gfx::Rect animation_start_bounds_; 100 gfx::Rect animation_start_bounds_;
83 gfx::Rect animation_target_bounds_; 101 gfx::Rect animation_target_bounds_;
84 102
85 DISALLOW_COPY_AND_ASSIGN(PanelBrowserView); 103 DISALLOW_COPY_AND_ASSIGN(PanelBrowserView);
86 }; 104 };
87 105
88 #endif // CHROME_BROWSER_UI_PANELS_PANEL_BROWSER_VIEW_H_ 106 #endif // CHROME_BROWSER_UI_PANELS_PANEL_BROWSER_VIEW_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/panels/native_panel.h ('k') | chrome/browser/ui/panels/panel_browser_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698