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

Side by Side Diff: chrome/browser/ui/views/options/cookies_view.cc

Issue 6462022: It turns out I had the sense of the GetLocalBounds bool wrong everywhere, so ... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 10 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 (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 #include "chrome/browser/ui/views/options/cookies_view.h" 5 #include "chrome/browser/ui/views/options/cookies_view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "base/string_util.h" 10 #include "base/string_util.h"
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 views::View* CookiesView::GetContentsView() { 170 views::View* CookiesView::GetContentsView() {
171 return this; 171 return this;
172 } 172 }
173 173
174 /////////////////////////////////////////////////////////////////////////////// 174 ///////////////////////////////////////////////////////////////////////////////
175 // CookiesView, views::View overrides: 175 // CookiesView, views::View overrides:
176 176
177 void CookiesView::Layout() { 177 void CookiesView::Layout() {
178 // Lay out the Remove/Remove All buttons in the parent view. 178 // Lay out the Remove/Remove All buttons in the parent view.
179 gfx::Size ps = remove_button_->GetPreferredSize(); 179 gfx::Size ps = remove_button_->GetPreferredSize();
180 gfx::Rect parent_bounds = GetParent()->GetLocalBounds(); 180 gfx::Rect parent_bounds = GetParent()->GetContentsBounds();
181 int y_buttons = 181 int y_buttons =
182 parent_bounds.bottom() - ps.height() - views::kButtonVEdgeMargin; 182 parent_bounds.bottom() - ps.height() - views::kButtonVEdgeMargin;
183 183
184 remove_button_->SetBounds(kPanelHorizMargin, y_buttons, ps.width(), 184 remove_button_->SetBounds(kPanelHorizMargin, y_buttons, ps.width(),
185 ps.height()); 185 ps.height());
186 186
187 ps = remove_all_button_->GetPreferredSize(); 187 ps = remove_all_button_->GetPreferredSize();
188 int remove_all_x = remove_button_->x() + remove_button_->width() + 188 int remove_all_x = remove_button_->x() + remove_button_->width() +
189 kRelatedControlHorizontalSpacing; 189 kRelatedControlHorizontalSpacing;
190 remove_all_button_->SetBounds(remove_all_x, y_buttons, ps.width(), 190 remove_all_button_->SetBounds(remove_all_x, y_buttons, ps.width(),
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
393 GetTotalNodeCount() > 1); 393 GetTotalNodeCount() > 1);
394 } 394 }
395 395
396 void CookiesView::UpdateVisibleDetailedInfo(views::View* view) { 396 void CookiesView::UpdateVisibleDetailedInfo(views::View* view) {
397 cookie_info_view_->SetVisible(view == cookie_info_view_); 397 cookie_info_view_->SetVisible(view == cookie_info_view_);
398 database_info_view_->SetVisible(view == database_info_view_); 398 database_info_view_->SetVisible(view == database_info_view_);
399 local_storage_info_view_->SetVisible(view == local_storage_info_view_); 399 local_storage_info_view_->SetVisible(view == local_storage_info_view_);
400 appcache_info_view_->SetVisible(view == appcache_info_view_); 400 appcache_info_view_->SetVisible(view == appcache_info_view_);
401 indexed_db_info_view_->SetVisible(view == indexed_db_info_view_); 401 indexed_db_info_view_->SetVisible(view == indexed_db_info_view_);
402 } 402 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698