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

Side by Side Diff: chrome/browser/ui/views/page_info/page_info_bubble_view.cc

Issue 2824363002: Rewrite base::Bind to base::BindOnce with base_bind_rewriters in //chrome/browser/ui (Closed)
Patch Set: Created 3 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
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/page_info/page_info_bubble_view.h" 5 #include "chrome/browser/ui/views/page_info/page_info_bubble_view.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <vector> 10 #include <vector>
(...skipping 489 matching lines...) Expand 10 before | Expand all | Expand 10 after
500 DCHECK_EQ(BUTTON_CLOSE, button->id()); 500 DCHECK_EQ(BUTTON_CLOSE, button->id());
501 GetWidget()->Close(); 501 GetWidget()->Close();
502 } 502 }
503 503
504 void PageInfoBubbleView::LinkClicked(views::Link* source, int event_flags) { 504 void PageInfoBubbleView::LinkClicked(views::Link* source, int event_flags) {
505 // The bubble closes automatically when the collected cookies dialog or the 505 // The bubble closes automatically when the collected cookies dialog or the
506 // certificate viewer opens. So delay handling of the link clicked to avoid 506 // certificate viewer opens. So delay handling of the link clicked to avoid
507 // a crash in the base class which needs to complete the mouse event handling. 507 // a crash in the base class which needs to complete the mouse event handling.
508 content::BrowserThread::PostTask( 508 content::BrowserThread::PostTask(
509 content::BrowserThread::UI, FROM_HERE, 509 content::BrowserThread::UI, FROM_HERE,
510 base::Bind(&PageInfoBubbleView::HandleLinkClickedAsync, 510 base::BindOnce(&PageInfoBubbleView::HandleLinkClickedAsync,
511 weak_factory_.GetWeakPtr(), source)); 511 weak_factory_.GetWeakPtr(), source));
512 } 512 }
513 513
514 gfx::Size PageInfoBubbleView::GetPreferredSize() const { 514 gfx::Size PageInfoBubbleView::GetPreferredSize() const {
515 if (header_ == nullptr && site_settings_view_ == nullptr) 515 if (header_ == nullptr && site_settings_view_ == nullptr)
516 return views::View::GetPreferredSize(); 516 return views::View::GetPreferredSize();
517 517
518 int height = 0; 518 int height = 0;
519 if (header_) 519 if (header_)
520 height += header_->GetPreferredSize().height() + kHeaderMarginBottom; 520 height += header_->GetPreferredSize().height() + kHeaderMarginBottom;
521 if (separator_) 521 if (separator_)
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after
747 PageInfo::PAGE_INFO_CONNECTION_HELP_OPENED); 747 PageInfo::PAGE_INFO_CONNECTION_HELP_OPENED);
748 break; 748 break;
749 case STYLED_LABEL_RESET_CERTIFICATE_DECISIONS: 749 case STYLED_LABEL_RESET_CERTIFICATE_DECISIONS:
750 presenter_->OnRevokeSSLErrorBypassButtonPressed(); 750 presenter_->OnRevokeSSLErrorBypassButtonPressed();
751 GetWidget()->Close(); 751 GetWidget()->Close();
752 break; 752 break;
753 default: 753 default:
754 NOTREACHED(); 754 NOTREACHED();
755 } 755 }
756 } 756 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698