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

Unified Diff: chrome/browser/ui/gtk/infobars/link_infobar_gtk.cc

Issue 11721003: Eliminate the LinkInfoBar[Delegate] classes entirely. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: address some nits - testing-automation matters? Created 7 years, 12 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/gtk/infobars/link_infobar_gtk.cc
diff --git a/chrome/browser/ui/gtk/infobars/link_infobar_gtk.cc b/chrome/browser/ui/gtk/infobars/link_infobar_gtk.cc
deleted file mode 100644
index dc7a8bcc8a63638fc224b6324cf240ef80ff7f2b..0000000000000000000000000000000000000000
--- a/chrome/browser/ui/gtk/infobars/link_infobar_gtk.cc
+++ /dev/null
@@ -1,39 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "chrome/browser/ui/gtk/infobars/link_infobar_gtk.h"
-
-#include "chrome/browser/api/infobars/link_infobar_delegate.h"
-#include "chrome/browser/ui/gtk/event_utils.h"
-
-// LinkInfoBarDelegate ---------------------------------------------------------
-
-InfoBar* LinkInfoBarDelegate::CreateInfoBar(InfoBarService* owner) {
- return new LinkInfoBarGtk(owner, this);
-}
-
-// LinkInfoBarGtk --------------------------------------------------------------
-
-LinkInfoBarGtk::LinkInfoBarGtk(InfoBarService* owner,
- LinkInfoBarDelegate* delegate)
- : InfoBarGtk(owner, delegate) {
- size_t link_offset;
- string16 display_text = delegate->GetMessageTextWithOffset(&link_offset);
- string16 link_text = delegate->GetLinkText();
- AddLabelWithInlineLink(display_text, link_text, link_offset,
- G_CALLBACK(OnLinkClickedThunk));
-}
-
-LinkInfoBarGtk::~LinkInfoBarGtk() {
-}
-
-void LinkInfoBarGtk::OnLinkClicked(GtkWidget* button) {
- if (GetDelegate()->LinkClicked(
- event_utils::DispositionForCurrentButtonPressEvent()))
- RemoveSelf();
-}
-
-LinkInfoBarDelegate* LinkInfoBarGtk::GetDelegate() {
- return delegate()->AsLinkInfoBarDelegate();
-}
« no previous file with comments | « chrome/browser/ui/gtk/infobars/link_infobar_gtk.h ('k') | chrome/browser/ui/views/infobars/alternate_nav_infobar_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698