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/shell_window_registry.h" | 5 #include "chrome/browser/extensions/shell_window_registry.h" |
6 #include "chrome/browser/profiles/profile_dependency_manager.h" | 6 #include "chrome/browser/profiles/profile_dependency_manager.h" |
7 #include "chrome/browser/ui/extensions/shell_window.h" | 7 #include "chrome/browser/ui/extensions/shell_window.h" |
8 #include "chrome/common/extensions/extension.h" | 8 #include "chrome/common/extensions/extension.h" |
9 #include "content/public/browser/render_view_host.h" | 9 #include "content/public/browser/render_view_host.h" |
10 #include "content/public/browser/web_contents.h" | 10 #include "content/public/browser/web_contents.h" |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
57 return *i; | 57 return *i; |
58 } | 58 } |
59 | 59 |
60 return NULL; | 60 return NULL; |
61 } | 61 } |
62 | 62 |
63 ShellWindow* ShellWindowRegistry::GetShellWindowForNativeWindow( | 63 ShellWindow* ShellWindowRegistry::GetShellWindowForNativeWindow( |
64 gfx::NativeWindow window) const { | 64 gfx::NativeWindow window) const { |
65 for (ShellWindowSet::const_iterator i = shell_windows_.begin(); | 65 for (ShellWindowSet::const_iterator i = shell_windows_.begin(); |
66 i != shell_windows_.end(); ++i) { | 66 i != shell_windows_.end(); ++i) { |
67 if ((*i)->GetNativeWindow() == window) | 67 if ((*i)->GetBaseWindow()->GetNativeWindow() == window) |
68 return *i; | 68 return *i; |
69 } | 69 } |
70 | 70 |
71 return NULL; | 71 return NULL; |
72 } | 72 } |
73 | 73 |
74 /////////////////////////////////////////////////////////////////////////////// | 74 /////////////////////////////////////////////////////////////////////////////// |
75 // Factory boilerplate | 75 // Factory boilerplate |
76 | 76 |
77 // static | 77 // static |
(...skipping 22 matching lines...) Expand all Loading... |
100 | 100 |
101 bool ShellWindowRegistry::Factory::ServiceIsCreatedWithProfile() { | 101 bool ShellWindowRegistry::Factory::ServiceIsCreatedWithProfile() { |
102 return true; | 102 return true; |
103 } | 103 } |
104 | 104 |
105 bool ShellWindowRegistry::Factory::ServiceIsNULLWhileTesting() { | 105 bool ShellWindowRegistry::Factory::ServiceIsNULLWhileTesting() { |
106 return false; | 106 return false; |
107 } | 107 } |
108 | 108 |
109 } // namespace extensions | 109 } // namespace extensions |
OLD | NEW |