| 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 332 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 343 for (WindowControllerList::ControllerList::const_iterator iter = | 343 for (WindowControllerList::ControllerList::const_iterator iter = |
| 344 windows.begin(); | 344 windows.begin(); |
| 345 iter != windows.end(); ++iter) { | 345 iter != windows.end(); ++iter) { |
| 346 if (!this->CanOperateOnWindow(*iter)) | 346 if (!this->CanOperateOnWindow(*iter)) |
| 347 continue; | 347 continue; |
| 348 if (populate_tabs) | 348 if (populate_tabs) |
| 349 window_list->Append((*iter)->CreateWindowValueWithTabs(extension())); | 349 window_list->Append((*iter)->CreateWindowValueWithTabs(extension())); |
| 350 else | 350 else |
| 351 window_list->Append((*iter)->CreateWindowValue()); | 351 window_list->Append((*iter)->CreateWindowValue()); |
| 352 } | 352 } |
| 353 |
| 353 SetResult(window_list); | 354 SetResult(window_list); |
| 354 return true; | 355 return true; |
| 355 } | 356 } |
| 356 | 357 |
| 357 bool WindowsCreateFunction::ShouldOpenIncognitoWindow( | 358 bool WindowsCreateFunction::ShouldOpenIncognitoWindow( |
| 358 const windows::Create::Params::CreateData* create_data, | 359 const windows::Create::Params::CreateData* create_data, |
| 359 std::vector<GURL>* urls, bool* is_error) { | 360 std::vector<GURL>* urls, bool* is_error) { |
| 360 *is_error = false; | 361 *is_error = false; |
| 361 const IncognitoModePrefs::Availability incognito_availability = | 362 const IncognitoModePrefs::Availability incognito_availability = |
| 362 IncognitoModePrefs::GetAvailability(GetProfile()->GetPrefs()); | 363 IncognitoModePrefs::GetAvailability(GetProfile()->GetPrefs()); |
| (...skipping 1629 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1992 ZoomModeToZoomSettings(zoom_mode, &zoom_settings); | 1993 ZoomModeToZoomSettings(zoom_mode, &zoom_settings); |
| 1993 zoom_settings.default_zoom_factor.reset(new double( | 1994 zoom_settings.default_zoom_factor.reset(new double( |
| 1994 content::ZoomLevelToZoomFactor(zoom_controller->GetDefaultZoomLevel()))); | 1995 content::ZoomLevelToZoomFactor(zoom_controller->GetDefaultZoomLevel()))); |
| 1995 | 1996 |
| 1996 results_ = api::tabs::GetZoomSettings::Results::Create(zoom_settings); | 1997 results_ = api::tabs::GetZoomSettings::Results::Create(zoom_settings); |
| 1997 SendResponse(true); | 1998 SendResponse(true); |
| 1998 return true; | 1999 return true; |
| 1999 } | 2000 } |
| 2000 | 2001 |
| 2001 } // namespace extensions | 2002 } // namespace extensions |
| OLD | NEW |