| Index: chrome/browser/extensions/extension_window_list.cc
|
| diff --git a/chrome/browser/extensions/extension_window_list.cc b/chrome/browser/extensions/extension_window_list.cc
|
| deleted file mode 100644
|
| index ba4522397ed9011e8b4a035b8b55593c9d8f0982..0000000000000000000000000000000000000000
|
| --- a/chrome/browser/extensions/extension_window_list.cc
|
| +++ /dev/null
|
| @@ -1,64 +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/extensions/extension_window_list.h"
|
| -
|
| -#include <algorithm>
|
| -
|
| -#include "chrome/browser/extensions/extension_function.h"
|
| -#include "chrome/browser/sessions/session_id.h"
|
| -#include "chrome/browser/ui/base_window.h"
|
| -
|
| -///////////////////////////////////////////////////////////////////////////////
|
| -// ExtensionWindowList
|
| -
|
| -// static
|
| -ExtensionWindowList* ExtensionWindowList::GetInstance() {
|
| - return Singleton<ExtensionWindowList>::get();
|
| -}
|
| -
|
| -ExtensionWindowList::ExtensionWindowList() {
|
| -}
|
| -
|
| -ExtensionWindowList::~ExtensionWindowList() {
|
| -}
|
| -
|
| -void ExtensionWindowList::AddExtensionWindow(
|
| - ExtensionWindowController* window) {
|
| - windows_.push_back(window);
|
| -}
|
| -
|
| -void ExtensionWindowList::RemoveExtensionWindow(
|
| - ExtensionWindowController* window) {
|
| - WindowList::iterator iter = std::find(
|
| - windows_.begin(), windows_.end(), window);
|
| - if (iter != windows_.end())
|
| - windows_.erase(iter);
|
| -}
|
| -
|
| -ExtensionWindowController* ExtensionWindowList::FindWindowForFunctionById(
|
| - const UIThreadExtensionFunction* function,
|
| - int id) const {
|
| - for (WindowList::const_iterator iter = windows().begin();
|
| - iter != windows().end(); ++iter) {
|
| - if (function->CanOperateOnWindow(*iter) && (*iter)->GetWindowId() == id)
|
| - return *iter;
|
| - }
|
| - return NULL;
|
| -}
|
| -
|
| -ExtensionWindowController* ExtensionWindowList::CurrentWindowForFunction(
|
| - const UIThreadExtensionFunction* function) const {
|
| - ExtensionWindowController* result = NULL;
|
| - // Returns either the focused window (if any), or the last window in the list.
|
| - for (WindowList::const_iterator iter = windows().begin();
|
| - iter != windows().end(); ++iter) {
|
| - if (function->CanOperateOnWindow(*iter)) {
|
| - result = *iter;
|
| - if (result->window()->IsActive())
|
| - break; // use focused window
|
| - }
|
| - }
|
| - return result;
|
| -}
|
|
|