| 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 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 104 using content::Referrer; | 104 using content::Referrer; |
| 105 using content::WebContents; | 105 using content::WebContents; |
| 106 using ui_zoom::ZoomController; | 106 using ui_zoom::ZoomController; |
| 107 | 107 |
| 108 namespace extensions { | 108 namespace extensions { |
| 109 | 109 |
| 110 namespace windows = api::windows; | 110 namespace windows = api::windows; |
| 111 namespace keys = tabs_constants; | 111 namespace keys = tabs_constants; |
| 112 namespace tabs = api::tabs; | 112 namespace tabs = api::tabs; |
| 113 | 113 |
| 114 using core_api::extension_types::InjectDetails; | 114 using api::extension_types::InjectDetails; |
| 115 | 115 |
| 116 namespace { | 116 namespace { |
| 117 | 117 |
| 118 bool GetBrowserFromWindowID(ChromeUIThreadExtensionFunction* function, | 118 bool GetBrowserFromWindowID(ChromeUIThreadExtensionFunction* function, |
| 119 int window_id, | 119 int window_id, |
| 120 Browser** browser) { | 120 Browser** browser) { |
| 121 std::string error; | 121 std::string error; |
| 122 Browser* result; | 122 Browser* result; |
| 123 result = | 123 result = |
| 124 ExtensionTabUtil::GetBrowserFromWindowID(function, window_id, &error); | 124 ExtensionTabUtil::GetBrowserFromWindowID(function, window_id, &error); |
| (...skipping 1901 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2026 ZoomModeToZoomSettings(zoom_mode, &zoom_settings); | 2026 ZoomModeToZoomSettings(zoom_mode, &zoom_settings); |
| 2027 zoom_settings.default_zoom_factor.reset(new double( | 2027 zoom_settings.default_zoom_factor.reset(new double( |
| 2028 content::ZoomLevelToZoomFactor(zoom_controller->GetDefaultZoomLevel()))); | 2028 content::ZoomLevelToZoomFactor(zoom_controller->GetDefaultZoomLevel()))); |
| 2029 | 2029 |
| 2030 results_ = api::tabs::GetZoomSettings::Results::Create(zoom_settings); | 2030 results_ = api::tabs::GetZoomSettings::Results::Create(zoom_settings); |
| 2031 SendResponse(true); | 2031 SendResponse(true); |
| 2032 return true; | 2032 return true; |
| 2033 } | 2033 } |
| 2034 | 2034 |
| 2035 } // namespace extensions | 2035 } // namespace extensions |
| OLD | NEW |