| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 16 matching lines...) Expand all Loading... |
| 27 #include "chrome/browser/tab_contents/tab_contents.h" | 27 #include "chrome/browser/tab_contents/tab_contents.h" |
| 28 #include "chrome/browser/tabs/tab_strip_model.h" | 28 #include "chrome/browser/tabs/tab_strip_model.h" |
| 29 #include "chrome/browser/ui/browser.h" | 29 #include "chrome/browser/ui/browser.h" |
| 30 #include "chrome/browser/ui/browser_navigator.h" | 30 #include "chrome/browser/ui/browser_navigator.h" |
| 31 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" | 31 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" |
| 32 #include "chrome/browser/ui/window_sizer.h" | 32 #include "chrome/browser/ui/window_sizer.h" |
| 33 #include "chrome/common/extensions/extension.h" | 33 #include "chrome/common/extensions/extension.h" |
| 34 #include "chrome/common/extensions/extension_error_utils.h" | 34 #include "chrome/common/extensions/extension_error_utils.h" |
| 35 #include "chrome/common/notification_service.h" | 35 #include "chrome/common/notification_service.h" |
| 36 #include "chrome/common/url_constants.h" | 36 #include "chrome/common/url_constants.h" |
| 37 #include "gfx/codec/jpeg_codec.h" | |
| 38 #include "gfx/codec/png_codec.h" | |
| 39 #include "skia/ext/image_operations.h" | 37 #include "skia/ext/image_operations.h" |
| 40 #include "skia/ext/platform_canvas.h" | 38 #include "skia/ext/platform_canvas.h" |
| 41 #include "third_party/skia/include/core/SkBitmap.h" | 39 #include "third_party/skia/include/core/SkBitmap.h" |
| 40 #include "ui/gfx/codec/jpeg_codec.h" |
| 41 #include "ui/gfx/codec/png_codec.h" |
| 42 | 42 |
| 43 namespace keys = extension_tabs_module_constants; | 43 namespace keys = extension_tabs_module_constants; |
| 44 | 44 |
| 45 const int CaptureVisibleTabFunction::kDefaultQuality = 90; | 45 const int CaptureVisibleTabFunction::kDefaultQuality = 90; |
| 46 | 46 |
| 47 // Forward declare static helper functions defined below. | 47 // Forward declare static helper functions defined below. |
| 48 | 48 |
| 49 // |error_message| can optionally be passed in a will be set with an appropriate | 49 // |error_message| can optionally be passed in a will be set with an appropriate |
| 50 // message if the window cannot be found by id. | 50 // message if the window cannot be found by id. |
| 51 static Browser* GetBrowserInProfileWithId(Profile* profile, | 51 static Browser* GetBrowserInProfileWithId(Profile* profile, |
| (...skipping 1183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1235 } | 1235 } |
| 1236 | 1236 |
| 1237 static GURL ResolvePossiblyRelativeURL(std::string url_string, | 1237 static GURL ResolvePossiblyRelativeURL(std::string url_string, |
| 1238 const Extension* extension) { | 1238 const Extension* extension) { |
| 1239 GURL url = GURL(url_string); | 1239 GURL url = GURL(url_string); |
| 1240 if (!url.is_valid()) | 1240 if (!url.is_valid()) |
| 1241 url = extension->GetResourceURL(url_string); | 1241 url = extension->GetResourceURL(url_string); |
| 1242 | 1242 |
| 1243 return url; | 1243 return url; |
| 1244 } | 1244 } |
| OLD | NEW |