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

Side by Side Diff: chrome/browser/ui/views/frame/browser_view_layout.cc

Issue 16871010: Rewrite scoped_ptr<T>(NULL) to use the default ctor in chrome/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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
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 #include "chrome/browser/ui/views/frame/browser_view_layout.h" 5 #include "chrome/browser/ui/views/frame/browser_view_layout.h"
6 6
7 #include "base/observer_list.h" 7 #include "base/observer_list.h"
8 #include "chrome/browser/profiles/profile.h" 8 #include "chrome/browser/profiles/profile.h"
9 #include "chrome/browser/ui/browser.h" 9 #include "chrome/browser/ui/browser.h"
10 #include "chrome/browser/ui/browser_finder.h" 10 #include "chrome/browser/ui/browser_finder.h"
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 DISALLOW_COPY_AND_ASSIGN(WebContentsModalDialogHostViews); 110 DISALLOW_COPY_AND_ASSIGN(WebContentsModalDialogHostViews);
111 }; 111 };
112 112
113 // static 113 // static
114 const int BrowserViewLayout::kToolbarTabStripVerticalOverlap = 3; 114 const int BrowserViewLayout::kToolbarTabStripVerticalOverlap = 3;
115 115
116 //////////////////////////////////////////////////////////////////////////////// 116 ////////////////////////////////////////////////////////////////////////////////
117 // BrowserViewLayout, public: 117 // BrowserViewLayout, public:
118 118
119 BrowserViewLayout::BrowserViewLayout() 119 BrowserViewLayout::BrowserViewLayout()
120 : delegate_(NULL), 120 : browser_(NULL),
121 browser_(NULL),
122 browser_view_(NULL), 121 browser_view_(NULL),
123 top_container_(NULL), 122 top_container_(NULL),
124 tab_strip_(NULL), 123 tab_strip_(NULL),
125 toolbar_(NULL), 124 toolbar_(NULL),
126 bookmark_bar_(NULL), 125 bookmark_bar_(NULL),
127 infobar_container_(NULL), 126 infobar_container_(NULL),
128 contents_split_(NULL), 127 contents_split_(NULL),
129 contents_container_(NULL), 128 contents_container_(NULL),
130 overlay_container_(NULL), 129 overlay_container_(NULL),
131 download_shelf_(NULL), 130 download_shelf_(NULL),
132 immersive_mode_controller_(NULL), 131 immersive_mode_controller_(NULL),
133 dialog_host_(new WebContentsModalDialogHostViews(this)), 132 dialog_host_(new WebContentsModalDialogHostViews(this)),
134 web_contents_modal_dialog_top_y_(-1) { 133 web_contents_modal_dialog_top_y_(-1) {}
135 }
136 134
137 BrowserViewLayout::~BrowserViewLayout() { 135 BrowserViewLayout::~BrowserViewLayout() {
138 } 136 }
139 137
140 void BrowserViewLayout::Init( 138 void BrowserViewLayout::Init(
141 BrowserViewLayoutDelegate* delegate, 139 BrowserViewLayoutDelegate* delegate,
142 Browser* browser, 140 Browser* browser,
143 BrowserView* browser_view, 141 BrowserView* browser_view,
144 views::View* top_container, 142 views::View* top_container,
145 TabStrip* tab_strip, 143 TabStrip* tab_strip,
(...skipping 481 matching lines...) Expand 10 before | Expand all | Expand 10 after
627 return bottom; 625 return bottom;
628 } 626 }
629 627
630 bool BrowserViewLayout::InfobarVisible() const { 628 bool BrowserViewLayout::InfobarVisible() const {
631 // Cast to a views::View to access GetPreferredSize(). 629 // Cast to a views::View to access GetPreferredSize().
632 views::View* infobar_container = infobar_container_; 630 views::View* infobar_container = infobar_container_;
633 // NOTE: Can't check if the size IsEmpty() since it's always 0-width. 631 // NOTE: Can't check if the size IsEmpty() since it's always 0-width.
634 return browser_->SupportsWindowFeature(Browser::FEATURE_INFOBAR) && 632 return browser_->SupportsWindowFeature(Browser::FEATURE_INFOBAR) &&
635 (infobar_container->GetPreferredSize().height() != 0); 633 (infobar_container->GetPreferredSize().height() != 0);
636 } 634 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698