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

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

Issue 8826002: Panels: Adding 3-step animation on minimize on Linux (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: patch for landing Created 9 years 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 | « no previous file | 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 "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 #include "ui/base/animation/slide_animation.h"
16 15
17 class Browser; 16 class Browser;
18 class Panel; 17 class Panel;
19 class NativePanelTestingWin; 18 class NativePanelTestingWin;
20 class PanelBrowserFrameView; 19 class PanelBrowserFrameView;
21 20 class PanelSlideAnimation;
22 class PanelSlideAnimation : public ui::SlideAnimation {
23 public:
24 PanelSlideAnimation(ui::AnimationDelegate* target,
25 bool for_minimize,
26 double animation_stop_to_show_titlebar)
27 : ui::SlideAnimation(target),
28 for_minimize_(for_minimize),
29 animation_stop_to_show_titlebar_(animation_stop_to_show_titlebar) { }
30 virtual ~PanelSlideAnimation() { }
31 virtual double GetCurrentValue() const OVERRIDE;
32
33 private:
34 bool for_minimize_;
35 double animation_stop_to_show_titlebar_;
36 };
37 21
38 // A browser view that implements Panel specific behavior. 22 // A browser view that implements Panel specific behavior.
39 class PanelBrowserView : public BrowserView, 23 class PanelBrowserView : public BrowserView,
40 public NativePanel, 24 public NativePanel,
41 public ui::AnimationDelegate { 25 public ui::AnimationDelegate {
42 public: 26 public:
43 PanelBrowserView(Browser* browser, Panel* panel, const gfx::Rect& bounds); 27 PanelBrowserView(Browser* browser, Panel* panel, const gfx::Rect& bounds);
44 virtual ~PanelBrowserView(); 28 virtual ~PanelBrowserView();
45 29
46 Panel* panel() const { return panel_.get(); } 30 Panel* panel() const { return panel_.get(); }
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 base::TimeTicks attention_cleared_time_; 157 base::TimeTicks attention_cleared_time_;
174 158
175 // The last view that had focus in the panel. This is saved so that focus can 159 // The last view that had focus in the panel. This is saved so that focus can
176 // be restored properly when a drag ends. 160 // be restored properly when a drag ends.
177 views::View* old_focused_view_; 161 views::View* old_focused_view_;
178 162
179 DISALLOW_COPY_AND_ASSIGN(PanelBrowserView); 163 DISALLOW_COPY_AND_ASSIGN(PanelBrowserView);
180 }; 164 };
181 165
182 #endif // CHROME_BROWSER_UI_PANELS_PANEL_BROWSER_VIEW_H_ 166 #endif // CHROME_BROWSER_UI_PANELS_PANEL_BROWSER_VIEW_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/panels/panel_browser_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698