| 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 <memory> | 10 #include <memory> |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 #include "chrome/common/chrome_switches.h" | 54 #include "chrome/common/chrome_switches.h" |
| 55 #include "chrome/common/extensions/api/tabs.h" | 55 #include "chrome/common/extensions/api/tabs.h" |
| 56 #include "chrome/common/extensions/api/windows.h" | 56 #include "chrome/common/extensions/api/windows.h" |
| 57 #include "chrome/common/extensions/extension_constants.h" | 57 #include "chrome/common/extensions/extension_constants.h" |
| 58 #include "chrome/common/pref_names.h" | 58 #include "chrome/common/pref_names.h" |
| 59 #include "chrome/common/url_constants.h" | 59 #include "chrome/common/url_constants.h" |
| 60 #include "components/pref_registry/pref_registry_syncable.h" | 60 #include "components/pref_registry/pref_registry_syncable.h" |
| 61 #include "components/prefs/pref_service.h" | 61 #include "components/prefs/pref_service.h" |
| 62 #include "components/translate/core/browser/language_state.h" | 62 #include "components/translate/core/browser/language_state.h" |
| 63 #include "components/translate/core/common/language_detection_details.h" | 63 #include "components/translate/core/common/language_detection_details.h" |
| 64 #include "components/ui/zoom/zoom_controller.h" | 64 #include "components/zoom/zoom_controller.h" |
| 65 #include "content/public/browser/navigation_controller.h" | 65 #include "content/public/browser/navigation_controller.h" |
| 66 #include "content/public/browser/navigation_entry.h" | 66 #include "content/public/browser/navigation_entry.h" |
| 67 #include "content/public/browser/notification_details.h" | 67 #include "content/public/browser/notification_details.h" |
| 68 #include "content/public/browser/notification_source.h" | 68 #include "content/public/browser/notification_source.h" |
| 69 #include "content/public/browser/render_frame_host.h" | 69 #include "content/public/browser/render_frame_host.h" |
| 70 #include "content/public/browser/render_widget_host_view.h" | 70 #include "content/public/browser/render_widget_host_view.h" |
| 71 #include "content/public/browser/web_contents.h" | 71 #include "content/public/browser/web_contents.h" |
| 72 #include "content/public/common/url_constants.h" | 72 #include "content/public/common/url_constants.h" |
| 73 #include "extensions/browser/app_window/app_window.h" | 73 #include "extensions/browser/app_window/app_window.h" |
| 74 #include "extensions/browser/extension_api_frame_id_map.h" | 74 #include "extensions/browser/extension_api_frame_id_map.h" |
| (...skipping 24 matching lines...) Expand all Loading... |
| 99 #include "chrome/browser/extensions/api/tabs/ash_panel_contents.h" | 99 #include "chrome/browser/extensions/api/tabs/ash_panel_contents.h" |
| 100 #include "extensions/browser/app_window/app_window_registry.h" | 100 #include "extensions/browser/app_window/app_window_registry.h" |
| 101 #endif | 101 #endif |
| 102 | 102 |
| 103 using content::BrowserThread; | 103 using content::BrowserThread; |
| 104 using content::NavigationController; | 104 using content::NavigationController; |
| 105 using content::NavigationEntry; | 105 using content::NavigationEntry; |
| 106 using content::OpenURLParams; | 106 using content::OpenURLParams; |
| 107 using content::Referrer; | 107 using content::Referrer; |
| 108 using content::WebContents; | 108 using content::WebContents; |
| 109 using ui_zoom::ZoomController; | 109 using zoom::ZoomController; |
| 110 | 110 |
| 111 namespace extensions { | 111 namespace extensions { |
| 112 | 112 |
| 113 namespace windows = api::windows; | 113 namespace windows = api::windows; |
| 114 namespace keys = tabs_constants; | 114 namespace keys = tabs_constants; |
| 115 namespace tabs = api::tabs; | 115 namespace tabs = api::tabs; |
| 116 | 116 |
| 117 using api::extension_types::InjectDetails; | 117 using api::extension_types::InjectDetails; |
| 118 | 118 |
| 119 namespace { | 119 namespace { |
| (...skipping 2037 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2157 ZoomModeToZoomSettings(zoom_mode, &zoom_settings); | 2157 ZoomModeToZoomSettings(zoom_mode, &zoom_settings); |
| 2158 zoom_settings.default_zoom_factor.reset(new double( | 2158 zoom_settings.default_zoom_factor.reset(new double( |
| 2159 content::ZoomLevelToZoomFactor(zoom_controller->GetDefaultZoomLevel()))); | 2159 content::ZoomLevelToZoomFactor(zoom_controller->GetDefaultZoomLevel()))); |
| 2160 | 2160 |
| 2161 results_ = api::tabs::GetZoomSettings::Results::Create(zoom_settings); | 2161 results_ = api::tabs::GetZoomSettings::Results::Create(zoom_settings); |
| 2162 SendResponse(true); | 2162 SendResponse(true); |
| 2163 return true; | 2163 return true; |
| 2164 } | 2164 } |
| 2165 | 2165 |
| 2166 } // namespace extensions | 2166 } // namespace extensions |
| OLD | NEW |