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

Unified Diff: chrome/browser/ui/views/aura/multiple_window_indicator_button.cc

Issue 9570044: Rename chrome/browser/ui/views/{aura => ash}/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 8 years, 10 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/views/aura/multiple_window_indicator_button.cc
diff --git a/chrome/browser/ui/views/aura/multiple_window_indicator_button.cc b/chrome/browser/ui/views/aura/multiple_window_indicator_button.cc
deleted file mode 100644
index 047b3e0f38752f5a164dc654ae1c5fd163ed1726..0000000000000000000000000000000000000000
--- a/chrome/browser/ui/views/aura/multiple_window_indicator_button.cc
+++ /dev/null
@@ -1,48 +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/views/aura/multiple_window_indicator_button.h"
-
-#include "grit/theme_resources.h"
-#include "ui/base/resource/resource_bundle.h"
-#include "ui/gfx/image/image.h"
-#include "ui/views/border.h"
-
-MultipleWindowIndicatorButton::MultipleWindowIndicatorButton(
- StatusAreaButton::Delegate* delegate)
- : StatusAreaButton(delegate, NULL) {
- SetIcon(*ResourceBundle::GetSharedInstance().GetBitmapNamed(
- IDR_STATUSBAR_MULTIPLE_WINDOW));
- UpdateVisiblity();
- BrowserList::AddObserver(this);
-}
-
-MultipleWindowIndicatorButton::~MultipleWindowIndicatorButton() {
- BrowserList::RemoveObserver(this);
-}
-
-void MultipleWindowIndicatorButton::OnBrowserAdded(const Browser* browser) {
- UpdateVisiblity();
-}
-
-void MultipleWindowIndicatorButton::OnBrowserRemoved(const Browser* browser) {
- UpdateVisiblity();
-}
-
-void MultipleWindowIndicatorButton::UpdateVisiblity() {
- bool visible = false;
- int count = 0;
- for (BrowserList::const_iterator it = BrowserList::begin();
- it != BrowserList::end(); ++it) {
- if ((*it)->is_type_tabbed()) {
- ++count;
- if (count >= 2) {
- visible = true;
- break;
- }
- }
- }
- SetVisible(visible);
-}
-
« no previous file with comments | « chrome/browser/ui/views/aura/multiple_window_indicator_button.h ('k') | chrome/browser/ui/views/aura/panel_view_aura.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698