| 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 1574 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1585 } | 1585 } |
| 1586 | 1586 |
| 1587 if (web_contents->ShowingInterstitialPage()) { | 1587 if (web_contents->ShowingInterstitialPage()) { |
| 1588 // This does as same as Browser::ReloadInternal. | 1588 // This does as same as Browser::ReloadInternal. |
| 1589 NavigationEntry* entry = web_contents->GetController().GetVisibleEntry(); | 1589 NavigationEntry* entry = web_contents->GetController().GetVisibleEntry(); |
| 1590 GURL reload_url = entry ? entry->GetURL() : GURL(url::kAboutBlankURL); | 1590 GURL reload_url = entry ? entry->GetURL() : GURL(url::kAboutBlankURL); |
| 1591 OpenURLParams params(reload_url, Referrer(), CURRENT_TAB, | 1591 OpenURLParams params(reload_url, Referrer(), CURRENT_TAB, |
| 1592 ui::PAGE_TRANSITION_RELOAD, false); | 1592 ui::PAGE_TRANSITION_RELOAD, false); |
| 1593 GetCurrentBrowser()->OpenURL(params); | 1593 GetCurrentBrowser()->OpenURL(params); |
| 1594 } else if (bypass_cache) { | 1594 } else if (bypass_cache) { |
| 1595 web_contents->GetController().ReloadIgnoringCache(true); | 1595 web_contents->GetController().ReloadBypassingCache(true); |
| 1596 } else { | 1596 } else { |
| 1597 web_contents->GetController().Reload(true); | 1597 web_contents->GetController().Reload(true); |
| 1598 } | 1598 } |
| 1599 | 1599 |
| 1600 return true; | 1600 return true; |
| 1601 } | 1601 } |
| 1602 | 1602 |
| 1603 bool TabsRemoveFunction::RunSync() { | 1603 bool TabsRemoveFunction::RunSync() { |
| 1604 scoped_ptr<tabs::Remove::Params> params(tabs::Remove::Params::Create(*args_)); | 1604 scoped_ptr<tabs::Remove::Params> params(tabs::Remove::Params::Create(*args_)); |
| 1605 EXTENSION_FUNCTION_VALIDATE(params.get()); | 1605 EXTENSION_FUNCTION_VALIDATE(params.get()); |
| (...skipping 525 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2131 ZoomModeToZoomSettings(zoom_mode, &zoom_settings); | 2131 ZoomModeToZoomSettings(zoom_mode, &zoom_settings); |
| 2132 zoom_settings.default_zoom_factor.reset(new double( | 2132 zoom_settings.default_zoom_factor.reset(new double( |
| 2133 content::ZoomLevelToZoomFactor(zoom_controller->GetDefaultZoomLevel()))); | 2133 content::ZoomLevelToZoomFactor(zoom_controller->GetDefaultZoomLevel()))); |
| 2134 | 2134 |
| 2135 results_ = api::tabs::GetZoomSettings::Results::Create(zoom_settings); | 2135 results_ = api::tabs::GetZoomSettings::Results::Create(zoom_settings); |
| 2136 SendResponse(true); | 2136 SendResponse(true); |
| 2137 return true; | 2137 return true; |
| 2138 } | 2138 } |
| 2139 | 2139 |
| 2140 } // namespace extensions | 2140 } // namespace extensions |
| OLD | NEW |