Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 "base/time.h" | 11 #include "base/time.h" |
| 12 #include "chrome/browser/ui/panels/native_panel.h" | 12 #include "chrome/browser/ui/panels/native_panel.h" |
| 13 #include "chrome/browser/ui/views/frame/browser_view.h" | 13 #include "chrome/browser/ui/views/frame/browser_view.h" |
| 14 #include "ui/base/animation/animation_delegate.h" | 14 #include "ui/base/animation/animation_delegate.h" |
| 15 | 15 |
| 16 class Browser; | 16 class Browser; |
| 17 class Panel; | 17 class Panel; |
| 18 class NativePanelTestingWin; | |
| 18 class PanelBrowserFrameView; | 19 class PanelBrowserFrameView; |
| 19 namespace ui { | 20 namespace ui { |
| 20 class SlideAnimation; | 21 class SlideAnimation; |
| 21 } | 22 } |
| 22 | 23 |
| 23 // A browser view that implements Panel specific behavior. | 24 // A browser view that implements Panel specific behavior. |
| 24 class PanelBrowserView : public BrowserView, | 25 class PanelBrowserView : public BrowserView, |
| 25 public NativePanel, | 26 public NativePanel, |
| 26 public NativePanelTesting, | |
| 27 public ui::AnimationDelegate { | 27 public ui::AnimationDelegate { |
| 28 friend class NativePanelTestingGtk; | |
|
jianli
2011/08/09 21:10:23
Should it be NativePanelTestingWin? Also it would
prasadt
2011/08/09 23:05:04
Done.
| |
| 28 public: | 29 public: |
| 29 PanelBrowserView(Browser* browser, Panel* panel, const gfx::Rect& bounds); | 30 PanelBrowserView(Browser* browser, Panel* panel, const gfx::Rect& bounds); |
| 30 virtual ~PanelBrowserView(); | 31 virtual ~PanelBrowserView(); |
| 31 | 32 |
| 32 Panel* panel() const { return panel_.get(); } | 33 Panel* panel() const { return panel_.get(); } |
| 33 bool closed() const { return closed_; } | 34 bool closed() const { return closed_; } |
| 34 bool focused() const { return focused_; } | 35 bool focused() const { return focused_; } |
| 35 | 36 |
| 36 PanelBrowserFrameView* GetFrameView() const; | 37 PanelBrowserFrameView* GetFrameView() const; |
| 37 | 38 |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 83 virtual bool IsPanelActive() const OVERRIDE; | 84 virtual bool IsPanelActive() const OVERRIDE; |
| 84 virtual gfx::NativeWindow GetNativePanelHandle() OVERRIDE; | 85 virtual gfx::NativeWindow GetNativePanelHandle() OVERRIDE; |
| 85 virtual void UpdatePanelTitleBar() OVERRIDE; | 86 virtual void UpdatePanelTitleBar() OVERRIDE; |
| 86 virtual void ShowTaskManagerForPanel() OVERRIDE; | 87 virtual void ShowTaskManagerForPanel() OVERRIDE; |
| 87 virtual FindBar* CreatePanelFindBar() OVERRIDE; | 88 virtual FindBar* CreatePanelFindBar() OVERRIDE; |
| 88 virtual void NotifyPanelOnUserChangedTheme() OVERRIDE; | 89 virtual void NotifyPanelOnUserChangedTheme() OVERRIDE; |
| 89 virtual void DrawAttention() OVERRIDE; | 90 virtual void DrawAttention() OVERRIDE; |
| 90 virtual bool IsDrawingAttention() const OVERRIDE; | 91 virtual bool IsDrawingAttention() const OVERRIDE; |
| 91 virtual Browser* GetPanelBrowser() const OVERRIDE; | 92 virtual Browser* GetPanelBrowser() const OVERRIDE; |
| 92 virtual void DestroyPanelBrowser() OVERRIDE; | 93 virtual void DestroyPanelBrowser() OVERRIDE; |
| 93 virtual NativePanelTesting* GetNativePanelTesting() OVERRIDE; | |
| 94 | 94 |
| 95 // Overridden from AnimationDelegate: | 95 // Overridden from AnimationDelegate: |
| 96 virtual void AnimationProgressed(const ui::Animation* animation) OVERRIDE; | 96 virtual void AnimationProgressed(const ui::Animation* animation) OVERRIDE; |
| 97 | 97 |
| 98 bool EndDragging(bool cancelled); | 98 bool EndDragging(bool cancelled); |
| 99 | 99 |
| 100 void StopDrawingAttention(); | 100 void StopDrawingAttention(); |
| 101 | 101 |
| 102 scoped_ptr<Panel> panel_; | 102 scoped_ptr<Panel> panel_; |
| 103 gfx::Rect bounds_; | 103 gfx::Rect bounds_; |
| (...skipping 26 matching lines...) Expand all Loading... | |
| 130 bool is_drawing_attention_; | 130 bool is_drawing_attention_; |
| 131 | 131 |
| 132 // Timestamp to prevent minimizing the panel when the user clicks the titlebar | 132 // Timestamp to prevent minimizing the panel when the user clicks the titlebar |
| 133 // to clear the attension state. | 133 // to clear the attension state. |
| 134 base::TimeTicks attention_cleared_time_; | 134 base::TimeTicks attention_cleared_time_; |
| 135 | 135 |
| 136 DISALLOW_COPY_AND_ASSIGN(PanelBrowserView); | 136 DISALLOW_COPY_AND_ASSIGN(PanelBrowserView); |
| 137 }; | 137 }; |
| 138 | 138 |
| 139 #endif // CHROME_BROWSER_UI_PANELS_PANEL_BROWSER_VIEW_H_ | 139 #endif // CHROME_BROWSER_UI_PANELS_PANEL_BROWSER_VIEW_H_ |
| OLD | NEW |