OLD | NEW |
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 Loading... |
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 Loading... |
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 } |
OLD | NEW |