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

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

Issue 13684002: cros: Instant extended support for immersive fullscreen (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 8 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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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_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 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 void MaybeStackOverlayAtTop(); 51 void MaybeStackOverlayAtTop();
52 52
53 content::WebContents* overlay_web_contents() const { 53 content::WebContents* overlay_web_contents() const {
54 return overlay_web_contents_; 54 return overlay_web_contents_;
55 } 55 }
56 56
57 int overlay_height() const { 57 int overlay_height() const {
58 return overlay_ ? overlay_->bounds().height() : 0; 58 return overlay_ ? overlay_->bounds().height() : 0;
59 } 59 }
60 60
61 // Sets the active top margin; the active WebView's y origin would be 61 // Sets vertical offsets for the web views. |active_| is pushed down by
62 // positioned at this |margin|, causing the active WebView to be pushed down 62 // |active_top_margin| pixels and |overlay_| is pushed down by
63 // vertically by |margin| pixels in the |ContentsContainer|. 63 // |overlay_top_margin| pixels within this container.
64 void SetActiveTopMargin(int margin); 64 void SetWebViewsTopMargins(int active_top_margin,
65 int overlay_top_margin);
65 66
66 // Returns the bounds the overlay would be shown at. 67 // Returns the bounds the overlay would be shown at.
67 gfx::Rect GetOverlayBounds() const; 68 gfx::Rect GetOverlayBounds() const;
68 69
69 // Returns true if overlay occupies full height of content page. 70 // Returns true if overlay occupies full height of content page.
70 bool IsOverlayFullHeight(int overlay_height, 71 bool IsOverlayFullHeight(int overlay_height,
71 InstantSizeUnits overlay_height_units) const; 72 InstantSizeUnits overlay_height_units) const;
72 73
73 private: 74 private:
74 // Overridden from views::View: 75 // Overridden from views::View:
75 virtual void Layout() OVERRIDE; 76 virtual void Layout() OVERRIDE;
76 virtual std::string GetClassName() const OVERRIDE; 77 virtual std::string GetClassName() const OVERRIDE;
77 78
78 // content::NotificationObserver implementation. 79 // content::NotificationObserver implementation.
79 virtual void Observe(int type, 80 virtual void Observe(int type,
80 const content::NotificationSource& source, 81 const content::NotificationSource& source,
81 const content::NotificationDetails& details) OVERRIDE; 82 const content::NotificationDetails& details) OVERRIDE;
82 83
83 views::WebView* active_; 84 views::WebView* active_;
84 views::WebView* overlay_; 85 views::WebView* overlay_;
85 scoped_ptr<views::View> shadow_view_; 86 scoped_ptr<views::View> shadow_view_;
86 content::WebContents* overlay_web_contents_; 87 content::WebContents* overlay_web_contents_;
87 bool draw_drop_shadow_; 88 bool draw_drop_shadow_;
88 89
89 // The margin between the top and the active view. This is used to make the 90 // The margin between the top and the active view. This is used to make the
90 // overlay overlap the bookmark bar on the new tab page. 91 // overlay overlap the bookmark bar on the new tab page.
91 int active_top_margin_; 92 int active_top_margin_;
92 93
94 // The margin between the top of this view and the overlay view. Used to
95 // push down the instant extended suggestions during an immersive fullscreen
96 // reveal.
97 int overlay_top_margin_;
98
93 // The desired height of the overlay and units. 99 // The desired height of the overlay and units.
94 int overlay_height_; 100 int overlay_height_;
95 InstantSizeUnits overlay_height_units_; 101 InstantSizeUnits overlay_height_units_;
96 102
97 content::NotificationRegistrar registrar_; 103 content::NotificationRegistrar registrar_;
98 104
99 DISALLOW_COPY_AND_ASSIGN(ContentsContainer); 105 DISALLOW_COPY_AND_ASSIGN(ContentsContainer);
100 }; 106 };
101 107
102 #endif // CHROME_BROWSER_UI_VIEWS_FRAME_CONTENTS_CONTAINER_H_ 108 #endif // CHROME_BROWSER_UI_VIEWS_FRAME_CONTENTS_CONTAINER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698