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 29 matching lines...) Expand all Loading... |
40 #include "chrome/common/extensions/extension_error_utils.h" | 40 #include "chrome/common/extensions/extension_error_utils.h" |
41 #include "chrome/common/extensions/extension_messages.h" | 41 #include "chrome/common/extensions/extension_messages.h" |
42 #include "chrome/common/pref_names.h" | 42 #include "chrome/common/pref_names.h" |
43 #include "chrome/common/url_constants.h" | 43 #include "chrome/common/url_constants.h" |
44 #include "content/browser/renderer_host/backing_store.h" | 44 #include "content/browser/renderer_host/backing_store.h" |
45 #include "content/browser/renderer_host/render_view_host.h" | 45 #include "content/browser/renderer_host/render_view_host.h" |
46 #include "content/browser/renderer_host/render_view_host_delegate.h" | 46 #include "content/browser/renderer_host/render_view_host_delegate.h" |
47 #include "content/browser/tab_contents/navigation_entry.h" | 47 #include "content/browser/tab_contents/navigation_entry.h" |
48 #include "content/browser/tab_contents/tab_contents.h" | 48 #include "content/browser/tab_contents/tab_contents.h" |
49 #include "content/browser/tab_contents/tab_contents_view.h" | 49 #include "content/browser/tab_contents/tab_contents_view.h" |
50 #include "content/common/notification_service.h" | 50 #include "content/public/browser/notification_details.h" |
| 51 #include "content/public/browser/notification_source.h" |
51 #include "skia/ext/image_operations.h" | 52 #include "skia/ext/image_operations.h" |
52 #include "skia/ext/platform_canvas.h" | 53 #include "skia/ext/platform_canvas.h" |
53 #include "third_party/skia/include/core/SkBitmap.h" | 54 #include "third_party/skia/include/core/SkBitmap.h" |
54 #include "ui/gfx/codec/jpeg_codec.h" | 55 #include "ui/gfx/codec/jpeg_codec.h" |
55 #include "ui/gfx/codec/png_codec.h" | 56 #include "ui/gfx/codec/png_codec.h" |
56 | 57 |
57 namespace keys = extension_tabs_module_constants; | 58 namespace keys = extension_tabs_module_constants; |
58 namespace errors = extension_manifest_errors; | 59 namespace errors = extension_manifest_errors; |
59 | 60 |
60 const int CaptureVisibleTabFunction::kDefaultQuality = 90; | 61 const int CaptureVisibleTabFunction::kDefaultQuality = 90; |
(...skipping 1468 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1529 // called for every API call the extension made. | 1530 // called for every API call the extension made. |
1530 GotLanguage(language); | 1531 GotLanguage(language); |
1531 } | 1532 } |
1532 | 1533 |
1533 void DetectTabLanguageFunction::GotLanguage(const std::string& language) { | 1534 void DetectTabLanguageFunction::GotLanguage(const std::string& language) { |
1534 result_.reset(Value::CreateStringValue(language.c_str())); | 1535 result_.reset(Value::CreateStringValue(language.c_str())); |
1535 SendResponse(true); | 1536 SendResponse(true); |
1536 | 1537 |
1537 Release(); // Balanced in Run() | 1538 Release(); // Balanced in Run() |
1538 } | 1539 } |
OLD | NEW |