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

Side by Side Diff: chrome/browser/ui/views/frame/contents_container.h

Issue 5701008: Fixes bug in instant that resulted in flickery fade. The problem would (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/chrome
Patch Set: Adds content to 403.html as bots seem to have problem with empty file Created 10 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
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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_VIEWS_FRAME_CONTENTS_CONTAINER_H_ 5 #ifndef CHROME_BROWSER_UI_VIEWS_FRAME_CONTENTS_CONTAINER_H_
6 #define CHROME_BROWSER_UI_VIEWS_FRAME_CONTENTS_CONTAINER_H_ 6 #define CHROME_BROWSER_UI_VIEWS_FRAME_CONTENTS_CONTAINER_H_
7 #pragma once 7 #pragma once
8 8
9 #include "app/animation_delegate.h" 9 #include "app/animation_delegate.h"
10 #include "base/scoped_ptr.h" 10 #include "base/scoped_ptr.h"
(...skipping 27 matching lines...) Expand all
38 // Sets the active top margin. 38 // Sets the active top margin.
39 void SetActiveTopMargin(int margin); 39 void SetActiveTopMargin(int margin);
40 40
41 // Returns the bounds of the preview. If the preview isn't active this 41 // Returns the bounds of the preview. If the preview isn't active this
42 // retuns the bounds the preview would be shown at. 42 // retuns the bounds the preview would be shown at.
43 gfx::Rect GetPreviewBounds(); 43 gfx::Rect GetPreviewBounds();
44 44
45 // Fades out the active contents. 45 // Fades out the active contents.
46 void FadeActiveContents(); 46 void FadeActiveContents();
47 47
48 // Shows the fade. This is similiar to |FadeActiveContents|, but is immediate.
49 void ShowFade();
50
48 // Removes the fade. This is done implicitly when the preview is made active. 51 // Removes the fade. This is done implicitly when the preview is made active.
49 void RemoveFade(); 52 void RemoveFade();
50 53
51 // View overrides: 54 // View overrides:
52 virtual void Layout(); 55 virtual void Layout();
53 56
54 // AnimationDelegate overrides: 57 // AnimationDelegate overrides:
55 virtual void AnimationProgressed(const Animation* animation); 58 virtual void AnimationProgressed(const Animation* animation);
56 59
57 private: 60 private:
61 class OverlayContentView;
62
63 // Creates the overlay widget. The opacity is set at |initial_opacity|.
64 void CreateOverlay(int initial_opacity);
65
66 // Invoked when the contents view of the overlay is destroyed.
67 void OverlayViewDestroyed();
68
58 views::View* active_; 69 views::View* active_;
59 70
60 views::View* preview_; 71 views::View* preview_;
61 72
62 TabContents* preview_tab_contents_; 73 TabContents* preview_tab_contents_;
63 74
64 // Translucent Widget positioned right above the active view that is used to 75 // Translucent Widget positioned right above the active view that is used to
65 // make the active view appear faded out. 76 // make the active view appear faded out.
66 views::Widget* active_overlay_; 77 views::Widget* active_overlay_;
67 78
79 // Content view of active_overlay. Used to track when the widget is destroyed.
80 OverlayContentView* overlay_view_;
81
68 // Animation used to vary the opacity of active_overlay. 82 // Animation used to vary the opacity of active_overlay.
69 scoped_ptr<SlideAnimation> overlay_animation_; 83 scoped_ptr<SlideAnimation> overlay_animation_;
70 84
71 // The margin between the top and the active view. This is used to make the 85 // The margin between the top and the active view. This is used to make the
72 // preview overlap the bookmark bar on the new tab page. 86 // preview overlap the bookmark bar on the new tab page.
73 int active_top_margin_; 87 int active_top_margin_;
74 88
75 DISALLOW_COPY_AND_ASSIGN(ContentsContainer); 89 DISALLOW_COPY_AND_ASSIGN(ContentsContainer);
76 }; 90 };
77 91
78 #endif // CHROME_BROWSER_UI_VIEWS_FRAME_CONTENTS_CONTAINER_H_ 92 #endif // CHROME_BROWSER_UI_VIEWS_FRAME_CONTENTS_CONTAINER_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/frame/browser_view.cc ('k') | chrome/browser/ui/views/frame/contents_container.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698