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