| 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 <stddef.h> | 7 #include <stddef.h> |
| 8 #include <algorithm> | 8 #include <algorithm> |
| 9 #include <limits> | 9 #include <limits> |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 894 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 905 | 905 |
| 906 int index = -1; | 906 int index = -1; |
| 907 if (params->query_info.index.get()) | 907 if (params->query_info.index.get()) |
| 908 index = *params->query_info.index; | 908 index = *params->query_info.index; |
| 909 | 909 |
| 910 std::string window_type; | 910 std::string window_type; |
| 911 if (params->query_info.window_type != tabs::WINDOW_TYPE_NONE) | 911 if (params->query_info.window_type != tabs::WINDOW_TYPE_NONE) |
| 912 window_type = tabs::ToString(params->query_info.window_type); | 912 window_type = tabs::ToString(params->query_info.window_type); |
| 913 | 913 |
| 914 base::ListValue* result = new base::ListValue(); | 914 base::ListValue* result = new base::ListValue(); |
| 915 Browser* last_active_browser = chrome::FindAnyBrowser( | 915 Browser* last_active_browser = |
| 916 GetProfile(), include_incognito(), chrome::GetActiveDesktop()); | 916 chrome::FindAnyBrowser(GetProfile(), include_incognito()); |
| 917 Browser* current_browser = GetCurrentBrowser(); | 917 Browser* current_browser = GetCurrentBrowser(); |
| 918 for (auto* browser : *BrowserList::GetInstance()) { | 918 for (auto* browser : *BrowserList::GetInstance()) { |
| 919 if (!GetProfile()->IsSameProfile(browser->profile())) | 919 if (!GetProfile()->IsSameProfile(browser->profile())) |
| 920 continue; | 920 continue; |
| 921 | 921 |
| 922 if (!browser->window()) | 922 if (!browser->window()) |
| 923 continue; | 923 continue; |
| 924 | 924 |
| 925 if (!include_incognito() && GetProfile() != browser->profile()) | 925 if (!include_incognito() && GetProfile() != browser->profile()) |
| 926 continue; | 926 continue; |
| (...skipping 1170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2097 ZoomModeToZoomSettings(zoom_mode, &zoom_settings); | 2097 ZoomModeToZoomSettings(zoom_mode, &zoom_settings); |
| 2098 zoom_settings.default_zoom_factor.reset(new double( | 2098 zoom_settings.default_zoom_factor.reset(new double( |
| 2099 content::ZoomLevelToZoomFactor(zoom_controller->GetDefaultZoomLevel()))); | 2099 content::ZoomLevelToZoomFactor(zoom_controller->GetDefaultZoomLevel()))); |
| 2100 | 2100 |
| 2101 results_ = api::tabs::GetZoomSettings::Results::Create(zoom_settings); | 2101 results_ = api::tabs::GetZoomSettings::Results::Create(zoom_settings); |
| 2102 SendResponse(true); | 2102 SendResponse(true); |
| 2103 return true; | 2103 return true; |
| 2104 } | 2104 } |
| 2105 | 2105 |
| 2106 } // namespace extensions | 2106 } // namespace extensions |
| OLD | NEW |