| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/chrome_extension_function_details.h" | 5 #include "chrome/browser/extensions/chrome_extension_function_details.h" |
| 6 | 6 |
| 7 #include "chrome/browser/extensions/extension_tab_util.h" | 7 #include "chrome/browser/extensions/extension_tab_util.h" |
| 8 #include "chrome/browser/extensions/window_controller.h" | 8 #include "chrome/browser/extensions/window_controller.h" |
| 9 #include "chrome/browser/extensions/window_controller_list.h" | 9 #include "chrome/browser/extensions/window_controller_list.h" |
| 10 #include "chrome/browser/profiles/profile.h" | 10 #include "chrome/browser/profiles/profile.h" |
| 11 #include "chrome/browser/ui/browser.h" | 11 #include "chrome/browser/ui/browser.h" |
| 12 #include "chrome/browser/ui/browser_finder.h" | 12 #include "chrome/browser/ui/browser_finder.h" |
| 13 #include "chrome/browser/ui/browser_window.h" | 13 #include "chrome/browser/ui/browser_window.h" |
| 14 #include "chrome/browser/ui/host_desktop.h" |
| 14 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 15 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
| 15 #include "components/web_modal/web_contents_modal_dialog_manager.h" | 16 #include "components/web_modal/web_contents_modal_dialog_manager.h" |
| 16 #include "content/public/browser/render_frame_host.h" | 17 #include "content/public/browser/render_frame_host.h" |
| 17 #include "content/public/browser/render_process_host.h" | 18 #include "content/public/browser/render_process_host.h" |
| 18 #include "extensions/browser/app_window/app_window.h" | 19 #include "extensions/browser/app_window/app_window.h" |
| 19 #include "extensions/browser/app_window/app_window_registry.h" | 20 #include "extensions/browser/app_window/app_window_registry.h" |
| 20 #include "extensions/browser/extension_function.h" | 21 #include "extensions/browser/extension_function.h" |
| 21 #include "extensions/browser/extension_function_dispatcher.h" | 22 #include "extensions/browser/extension_function_dispatcher.h" |
| 22 | 23 |
| 23 using content::WebContents; | 24 using content::WebContents; |
| (...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 152 | 153 |
| 153 // CurrentWindowForFunction() can't find app's window. | 154 // CurrentWindowForFunction() can't find app's window. |
| 154 WebContents* contents = GetOriginWebContents(); | 155 WebContents* contents = GetOriginWebContents(); |
| 155 if (contents) | 156 if (contents) |
| 156 return contents->GetTopLevelNativeWindow(); | 157 return contents->GetTopLevelNativeWindow(); |
| 157 | 158 |
| 158 Browser* browser = | 159 Browser* browser = |
| 159 chrome::FindBrowserWithProfile(GetProfile(), chrome::GetActiveDesktop()); | 160 chrome::FindBrowserWithProfile(GetProfile(), chrome::GetActiveDesktop()); |
| 160 return browser->window()->GetNativeWindow(); | 161 return browser->window()->GetNativeWindow(); |
| 161 } | 162 } |
| OLD | NEW |