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

Unified Diff: components/translate/core/browser/translate_infobar_delegate.cc

Issue 284313008: Move TranslateInfoBarDelegate and OptionsMenuModel to the Translate component. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase 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 side-by-side diff with in-line comments
Download patch
Index: components/translate/core/browser/translate_infobar_delegate.cc
diff --git a/chrome/browser/translate/translate_infobar_delegate.cc b/components/translate/core/browser/translate_infobar_delegate.cc
similarity index 98%
rename from chrome/browser/translate/translate_infobar_delegate.cc
rename to components/translate/core/browser/translate_infobar_delegate.cc
index ccb064187259e12ba808146eb9db9bdcb8ee181e..c3f41b5d2ca6fd7765f362749c4153d2bebd439d 100644
--- a/chrome/browser/translate/translate_infobar_delegate.cc
+++ b/components/translate/core/browser/translate_infobar_delegate.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/browser/translate/translate_infobar_delegate.h"
+#include "components/translate/core/browser/translate_infobar_delegate.h"
#include <algorithm>
@@ -18,8 +18,6 @@
#include "components/translate/core/browser/translate_manager.h"
#include "components/translate/core/common/translate_constants.h"
#include "grit/component_strings.h"
-#include "grit/theme_resources.h"
-#include "third_party/icu/source/i18n/unicode/coll.h"
#include "ui/base/l10n/l10n_util.h"
namespace {
@@ -340,7 +338,7 @@ TranslateInfoBarDelegate::TranslateInfoBarDelegate(
background_animation_ = is_error() ? NORMAL_TO_ERROR : ERROR_TO_NORMAL;
}
-TranslateClient* TranslateInfoBarDelegate::GetTranslateClient() {
+TranslateClient* TranslateInfoBarDelegate::GetTranslateClient() const {
if (!translate_manager_)
return NULL;
@@ -360,7 +358,7 @@ void TranslateInfoBarDelegate::InfoBarDismissed() {
}
int TranslateInfoBarDelegate::GetIconID() const {
- return IDR_INFOBAR_TRANSLATE;
+ return GetTranslateClient()->GetInfobarIconID();
}
infobars::InfoBarDelegate::Type TranslateInfoBarDelegate::GetInfoBarType()

Powered by Google App Engine
This is Rietveld 408576698