| 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/extension_tabs_module.h" | 5 #include "chrome/browser/extensions/extension_tabs_module.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/base64.h" | 10 #include "base/base64.h" |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 #include "chrome/browser/ui/views/ash/panel_view_aura.h" | 68 #include "chrome/browser/ui/views/ash/panel_view_aura.h" |
| 69 #endif | 69 #endif |
| 70 | 70 |
| 71 namespace keys = extension_tabs_module_constants; | 71 namespace keys = extension_tabs_module_constants; |
| 72 namespace errors = extension_manifest_errors; | 72 namespace errors = extension_manifest_errors; |
| 73 | 73 |
| 74 using content::NavigationController; | 74 using content::NavigationController; |
| 75 using content::NavigationEntry; | 75 using content::NavigationEntry; |
| 76 using content::OpenURLParams; | 76 using content::OpenURLParams; |
| 77 using content::Referrer; | 77 using content::Referrer; |
| 78 using content::RenderViewHost; |
| 78 using content::WebContents; | 79 using content::WebContents; |
| 79 using namespace extensions::api::windows; | 80 using namespace extensions::api::windows; |
| 80 | 81 |
| 81 const int CaptureVisibleTabFunction::kDefaultQuality = 90; | 82 const int CaptureVisibleTabFunction::kDefaultQuality = 90; |
| 82 | 83 |
| 83 namespace { | 84 namespace { |
| 84 | 85 |
| 85 // |error_message| can optionally be passed in a will be set with an appropriate | 86 // |error_message| can optionally be passed in a will be set with an appropriate |
| 86 // message if the window cannot be found by id. | 87 // message if the window cannot be found by id. |
| 87 Browser* GetBrowserInProfileWithId(Profile* profile, | 88 Browser* GetBrowserInProfileWithId(Profile* profile, |
| (...skipping 1715 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1803 // called for every API call the extension made. | 1804 // called for every API call the extension made. |
| 1804 GotLanguage(language); | 1805 GotLanguage(language); |
| 1805 } | 1806 } |
| 1806 | 1807 |
| 1807 void DetectTabLanguageFunction::GotLanguage(const std::string& language) { | 1808 void DetectTabLanguageFunction::GotLanguage(const std::string& language) { |
| 1808 result_.reset(Value::CreateStringValue(language.c_str())); | 1809 result_.reset(Value::CreateStringValue(language.c_str())); |
| 1809 SendResponse(true); | 1810 SendResponse(true); |
| 1810 | 1811 |
| 1811 Release(); // Balanced in Run() | 1812 Release(); // Balanced in Run() |
| 1812 } | 1813 } |
| OLD | NEW |