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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 #include "extensions/browser/api/capture_web_contents_function_impl.h" | 67 #include "extensions/browser/api/capture_web_contents_function_impl.h" |
68 #include "extensions/browser/app_window/app_window.h" | 68 #include "extensions/browser/app_window/app_window.h" |
69 #include "extensions/browser/extension_function_dispatcher.h" | 69 #include "extensions/browser/extension_function_dispatcher.h" |
70 #include "extensions/browser/extension_function_util.h" | 70 #include "extensions/browser/extension_function_util.h" |
71 #include "extensions/browser/extension_host.h" | 71 #include "extensions/browser/extension_host.h" |
72 #include "extensions/browser/file_reader.h" | 72 #include "extensions/browser/file_reader.h" |
73 #include "extensions/browser/script_executor.h" | 73 #include "extensions/browser/script_executor.h" |
74 #include "extensions/common/constants.h" | 74 #include "extensions/common/constants.h" |
75 #include "extensions/common/error_utils.h" | 75 #include "extensions/common/error_utils.h" |
76 #include "extensions/common/extension.h" | 76 #include "extensions/common/extension.h" |
77 #include "extensions/common/extension_messages.h" | |
78 #include "extensions/common/manifest_constants.h" | 77 #include "extensions/common/manifest_constants.h" |
79 #include "extensions/common/message_bundle.h" | 78 #include "extensions/common/message_bundle.h" |
80 #include "extensions/common/permissions/permissions_data.h" | 79 #include "extensions/common/permissions/permissions_data.h" |
81 #include "extensions/common/user_script.h" | 80 #include "extensions/common/user_script.h" |
82 #include "skia/ext/image_operations.h" | 81 #include "skia/ext/image_operations.h" |
83 #include "skia/ext/platform_canvas.h" | 82 #include "skia/ext/platform_canvas.h" |
84 #include "third_party/skia/include/core/SkBitmap.h" | 83 #include "third_party/skia/include/core/SkBitmap.h" |
85 #include "ui/base/models/list_selection_model.h" | 84 #include "ui/base/models/list_selection_model.h" |
86 #include "ui/base/ui_base_types.h" | 85 #include "ui/base/ui_base_types.h" |
87 | 86 |
88 #if defined(USE_ASH) | 87 #if defined(USE_ASH) |
89 #include "ash/ash_switches.h" | 88 #include "ash/ash_switches.h" |
90 #include "chrome/browser/extensions/api/tabs/ash_panel_contents.h" | 89 #include "chrome/browser/extensions/api/tabs/ash_panel_contents.h" |
91 #include "extensions/browser/app_window/app_window_registry.h" | 90 #include "extensions/browser/app_window/app_window_registry.h" |
92 #endif | 91 #endif |
93 | 92 |
94 using content::BrowserThread; | 93 using content::BrowserThread; |
95 using content::NavigationController; | 94 using content::NavigationController; |
96 using content::NavigationEntry; | 95 using content::NavigationEntry; |
97 using content::OpenURLParams; | 96 using content::OpenURLParams; |
98 using content::Referrer; | 97 using content::Referrer; |
99 using content::WebContents; | 98 using content::WebContents; |
100 | 99 |
101 namespace extensions { | 100 namespace extensions { |
102 | 101 |
103 namespace windows = api::windows; | 102 namespace windows = api::windows; |
104 namespace keys = tabs_constants; | 103 namespace keys = tabs_constants; |
105 namespace tabs = api::tabs; | 104 namespace tabs = api::tabs; |
106 | 105 |
107 using api::tabs::InjectDetails; | 106 using core_api::extension_types::InjectDetails; |
108 | 107 |
109 template class CaptureWebContentsFunction<ChromeAsyncExtensionFunction>; | 108 template class CaptureWebContentsFunction<ChromeAsyncExtensionFunction>; |
110 | 109 |
111 namespace { | 110 namespace { |
112 | 111 |
113 bool GetBrowserFromWindowID(ChromeUIThreadExtensionFunction* function, | 112 bool GetBrowserFromWindowID(ChromeUIThreadExtensionFunction* function, |
114 int window_id, | 113 int window_id, |
115 Browser** browser) { | 114 Browser** browser) { |
116 std::string error; | 115 std::string error; |
117 Browser* result; | 116 Browser* result; |
(...skipping 1780 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1898 ZoomController::ZoomMode zoom_mode = zoom_controller->zoom_mode(); | 1897 ZoomController::ZoomMode zoom_mode = zoom_controller->zoom_mode(); |
1899 api::tabs::ZoomSettings zoom_settings; | 1898 api::tabs::ZoomSettings zoom_settings; |
1900 ZoomModeToZoomSettings(zoom_mode, &zoom_settings); | 1899 ZoomModeToZoomSettings(zoom_mode, &zoom_settings); |
1901 | 1900 |
1902 results_ = api::tabs::GetZoomSettings::Results::Create(zoom_settings); | 1901 results_ = api::tabs::GetZoomSettings::Results::Create(zoom_settings); |
1903 SendResponse(true); | 1902 SendResponse(true); |
1904 return true; | 1903 return true; |
1905 } | 1904 } |
1906 | 1905 |
1907 } // namespace extensions | 1906 } // namespace extensions |
OLD | NEW |