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

Unified Diff: chrome/browser/tab_contents/tab_contents.cc

Issue 5976005: show notification on locale change (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: comment Created 9 years, 11 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/tab_contents/tab_contents.cc
diff --git a/chrome/browser/tab_contents/tab_contents.cc b/chrome/browser/tab_contents/tab_contents.cc
index 32bd04c24bd8d8bf56853b0e051328c728da5e35..47012650fa3c1a17372c789c348f92a1b9b05583 100644
--- a/chrome/browser/tab_contents/tab_contents.cc
+++ b/chrome/browser/tab_contents/tab_contents.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 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.
@@ -111,6 +111,10 @@
#include "app/surface/io_surface_support_mac.h"
#endif // defined(OS_MACOSX)
+#if defined(OS_CHROMEOS)
+#include "chrome/browser/chromeos/locale_change_guard.h"
+#endif // defined(OS_CHROMEOS)
+
// Cross-Site Navigations
//
// If a TabContents is told to navigate to a different web site (as determined
@@ -843,6 +847,9 @@ void TabContents::DidBecomeSelected() {
WebCacheManager::GetInstance()->ObserveActivity(GetRenderProcessHost()->id());
last_selected_time_ = base::TimeTicks::Now();
+#if defined(OS_CHROMEOS)
+ chromeos::LocaleChangeGuard::Check(this);
+#endif
}
void TabContents::FadeForInstant(bool animate) {
@@ -1996,9 +2003,8 @@ void TabContents::CloseConstrainedWindows() {
// Clear out any constrained windows since we are leaving this page entirely.
// We use indices instead of iterators in case CloseWindow does something
// that may invalidate an iterator.
- int size = static_cast<int>(child_windows_.size());
- for (int i = size - 1; i >= 0; --i) {
- ConstrainedWindow* window = child_windows_[i];
+ for (size_t i = 0; i < child_windows_.size(); ++i) {
+ ConstrainedWindow* window = child_windows_[child_windows_.size() - 1 - i];
if (window) {
window->CloseConstrainedWindow();
BlockTabContent(false);

Powered by Google App Engine
This is Rietveld 408576698