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

Side by Side Diff: chrome/browser/ui/views/website_settings/website_settings_popup_view.cc

Issue 273223002: views: Make view::Views::GetPreferredSize() const. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: More compile fix for ToT Created 6 years, 7 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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/website_settings/website_settings_popup_view.h " 5 #include "chrome/browser/ui/views/website_settings/website_settings_popup_view.h "
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/strings/string_number_conversions.h" 9 #include "base/strings/string_number_conversions.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 382 matching lines...) Expand 10 before | Expand all | Expand 10 after
393 content::BrowserThread::UI, FROM_HERE, 393 content::BrowserThread::UI, FROM_HERE,
394 base::Bind(&WebsiteSettingsPopupView::HandleLinkClickedAsync, 394 base::Bind(&WebsiteSettingsPopupView::HandleLinkClickedAsync,
395 weak_factory_.GetWeakPtr(), source)); 395 weak_factory_.GetWeakPtr(), source));
396 } 396 }
397 397
398 void WebsiteSettingsPopupView::TabSelectedAt(int index) { 398 void WebsiteSettingsPopupView::TabSelectedAt(int index) {
399 tabbed_pane_->GetSelectedTab()->Layout(); 399 tabbed_pane_->GetSelectedTab()->Layout();
400 SizeToContents(); 400 SizeToContents();
401 } 401 }
402 402
403 gfx::Size WebsiteSettingsPopupView::GetPreferredSize() { 403 gfx::Size WebsiteSettingsPopupView::GetPreferredSize() const {
404 if (header_ == NULL && tabbed_pane_ == NULL) 404 if (header_ == NULL && tabbed_pane_ == NULL)
405 return views::View::GetPreferredSize(); 405 return views::View::GetPreferredSize();
406 406
407 int height = 0; 407 int height = 0;
408 if (header_) 408 if (header_)
409 height += header_->GetPreferredSize().height(); 409 height += header_->GetPreferredSize().height();
410 if (tabbed_pane_) 410 if (tabbed_pane_)
411 height += tabbed_pane_->GetPreferredSize().height(); 411 height += tabbed_pane_->GetPreferredSize().height();
412 412
413 int width = kPermissionsSectionContentMinWidth; 413 int width = kPermissionsSectionContentMinWidth;
(...skipping 388 matching lines...) Expand 10 before | Expand all | Expand 10 after
802 web_contents_, signed_certificate_timestamp_ids_); 802 web_contents_, signed_certificate_timestamp_ids_);
803 } else if (source == help_center_link_) { 803 } else if (source == help_center_link_) {
804 browser_->OpenURL(content::OpenURLParams( 804 browser_->OpenURL(content::OpenURLParams(
805 GURL(chrome::kPageInfoHelpCenterURL), 805 GURL(chrome::kPageInfoHelpCenterURL),
806 content::Referrer(), 806 content::Referrer(),
807 NEW_FOREGROUND_TAB, 807 NEW_FOREGROUND_TAB,
808 content::PAGE_TRANSITION_LINK, 808 content::PAGE_TRANSITION_LINK,
809 false)); 809 false));
810 } 810 }
811 } 811 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/website_settings/website_settings_popup_view.h ('k') | chrome/test/base/view_event_test_base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698