| 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/api/tabs/tabs_api.h" | 5 #include "chrome/browser/extensions/api/tabs/tabs_api.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <limits> | 8 #include <limits> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 #include "components/translate/core/common/language_detection_details.h" | 57 #include "components/translate/core/common/language_detection_details.h" |
| 58 #include "content/public/browser/navigation_controller.h" | 58 #include "content/public/browser/navigation_controller.h" |
| 59 #include "content/public/browser/navigation_entry.h" | 59 #include "content/public/browser/navigation_entry.h" |
| 60 #include "content/public/browser/notification_details.h" | 60 #include "content/public/browser/notification_details.h" |
| 61 #include "content/public/browser/notification_source.h" | 61 #include "content/public/browser/notification_source.h" |
| 62 #include "content/public/browser/render_process_host.h" | 62 #include "content/public/browser/render_process_host.h" |
| 63 #include "content/public/browser/render_view_host.h" | 63 #include "content/public/browser/render_view_host.h" |
| 64 #include "content/public/browser/render_widget_host_view.h" | 64 #include "content/public/browser/render_widget_host_view.h" |
| 65 #include "content/public/browser/web_contents.h" | 65 #include "content/public/browser/web_contents.h" |
| 66 #include "content/public/common/url_constants.h" | 66 #include "content/public/common/url_constants.h" |
| 67 #include "extensions/browser/api/capture_web_contents_function_impl.h" |
| 67 #include "extensions/browser/app_window/app_window.h" | 68 #include "extensions/browser/app_window/app_window.h" |
| 68 #include "extensions/browser/extension_function_dispatcher.h" | 69 #include "extensions/browser/extension_function_dispatcher.h" |
| 69 #include "extensions/browser/extension_function_util.h" | 70 #include "extensions/browser/extension_function_util.h" |
| 70 #include "extensions/browser/extension_host.h" | 71 #include "extensions/browser/extension_host.h" |
| 71 #include "extensions/browser/file_reader.h" | 72 #include "extensions/browser/file_reader.h" |
| 72 #include "extensions/browser/script_executor.h" | 73 #include "extensions/browser/script_executor.h" |
| 73 #include "extensions/common/constants.h" | 74 #include "extensions/common/constants.h" |
| 74 #include "extensions/common/error_utils.h" | 75 #include "extensions/common/error_utils.h" |
| 75 #include "extensions/common/extension.h" | 76 #include "extensions/common/extension.h" |
| 76 #include "extensions/common/extension_messages.h" | 77 #include "extensions/common/extension_messages.h" |
| (...skipping 21 matching lines...) Expand all Loading... |
| 98 using content::WebContents; | 99 using content::WebContents; |
| 99 | 100 |
| 100 namespace extensions { | 101 namespace extensions { |
| 101 | 102 |
| 102 namespace windows = api::windows; | 103 namespace windows = api::windows; |
| 103 namespace keys = tabs_constants; | 104 namespace keys = tabs_constants; |
| 104 namespace tabs = api::tabs; | 105 namespace tabs = api::tabs; |
| 105 | 106 |
| 106 using api::tabs::InjectDetails; | 107 using api::tabs::InjectDetails; |
| 107 | 108 |
| 109 template class CaptureWebContentsFunction<ChromeAsyncExtensionFunction>; |
| 110 |
| 108 namespace { | 111 namespace { |
| 109 | 112 |
| 110 bool GetBrowserFromWindowID(ChromeUIThreadExtensionFunction* function, | 113 bool GetBrowserFromWindowID(ChromeUIThreadExtensionFunction* function, |
| 111 int window_id, | 114 int window_id, |
| 112 Browser** browser) { | 115 Browser** browser) { |
| 113 std::string error; | 116 std::string error; |
| 114 Browser* result; | 117 Browser* result; |
| 115 result = | 118 result = |
| 116 ExtensionTabUtil::GetBrowserFromWindowID(function, window_id, &error); | 119 ExtensionTabUtil::GetBrowserFromWindowID(function, window_id, &error); |
| 117 if (!result) { | 120 if (!result) { |
| (...skipping 1777 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1895 ZoomController::ZoomMode zoom_mode = zoom_controller->zoom_mode(); | 1898 ZoomController::ZoomMode zoom_mode = zoom_controller->zoom_mode(); |
| 1896 api::tabs::ZoomSettings zoom_settings; | 1899 api::tabs::ZoomSettings zoom_settings; |
| 1897 ZoomModeToZoomSettings(zoom_mode, &zoom_settings); | 1900 ZoomModeToZoomSettings(zoom_mode, &zoom_settings); |
| 1898 | 1901 |
| 1899 results_ = api::tabs::GetZoomSettings::Results::Create(zoom_settings); | 1902 results_ = api::tabs::GetZoomSettings::Results::Create(zoom_settings); |
| 1900 SendResponse(true); | 1903 SendResponse(true); |
| 1901 return true; | 1904 return true; |
| 1902 } | 1905 } |
| 1903 | 1906 |
| 1904 } // namespace extensions | 1907 } // namespace extensions |
| OLD | NEW |