OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/browser/extensions/window_controller_list.h" | 5 #include "chrome/browser/extensions/window_controller_list.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "chrome/browser/extensions/chrome_extension_function.h" | 9 #include "chrome/browser/extensions/chrome_extension_function.h" |
10 #include "chrome/browser/extensions/window_controller_list_observer.h" | 10 #include "chrome/browser/extensions/window_controller_list_observer.h" |
11 #include "chrome/browser/sessions/session_id.h" | 11 #include "components/sessions/session_id.h" |
12 #include "ui/base/base_window.h" | 12 #include "ui/base/base_window.h" |
13 | 13 |
14 namespace extensions { | 14 namespace extensions { |
15 | 15 |
16 /////////////////////////////////////////////////////////////////////////////// | 16 /////////////////////////////////////////////////////////////////////////////// |
17 // WindowControllerList | 17 // WindowControllerList |
18 | 18 |
19 // static | 19 // static |
20 WindowControllerList* WindowControllerList::GetInstance() { | 20 WindowControllerList* WindowControllerList::GetInstance() { |
21 return Singleton<WindowControllerList>::get(); | 21 return Singleton<WindowControllerList>::get(); |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
79 if (function->CanOperateOnWindow(*iter)) { | 79 if (function->CanOperateOnWindow(*iter)) { |
80 result = *iter; | 80 result = *iter; |
81 if (result->window()->IsActive()) | 81 if (result->window()->IsActive()) |
82 break; // use focused window | 82 break; // use focused window |
83 } | 83 } |
84 } | 84 } |
85 return result; | 85 return result; |
86 } | 86 } |
87 | 87 |
88 } // namespace extensions | 88 } // namespace extensions |
OLD | NEW |