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 "base/strings/utf_string_conversions.h" | 5 #include "base/strings/utf_string_conversions.h" |
6 #include "chrome/app/chrome_command_ids.h" | 6 #include "chrome/app/chrome_command_ids.h" |
7 #include "chrome/browser/extensions/context_menu_matcher.h" | 7 #include "chrome/browser/extensions/context_menu_matcher.h" |
8 #include "chrome/browser/extensions/extension_service.h" | 8 #include "chrome/browser/extensions/extension_service.h" |
9 #include "chrome/browser/extensions/extension_system.h" | |
10 #include "chrome/browser/extensions/extension_util.h" | 9 #include "chrome/browser/extensions/extension_util.h" |
11 #include "chrome/browser/profiles/profile.h" | 10 #include "chrome/browser/profiles/profile.h" |
12 #include "content/public/common/context_menu_params.h" | 11 #include "content/public/common/context_menu_params.h" |
| 12 #include "extensions/browser/extension_system.h" |
13 #include "ui/gfx/favicon_size.h" | 13 #include "ui/gfx/favicon_size.h" |
14 #include "ui/gfx/image/image.h" | 14 #include "ui/gfx/image/image.h" |
15 | 15 |
16 namespace extensions { | 16 namespace extensions { |
17 | 17 |
18 // static | 18 // static |
19 const size_t ContextMenuMatcher::kMaxExtensionItemTitleLength = 75; | 19 const size_t ContextMenuMatcher::kMaxExtensionItemTitleLength = 75; |
20 | 20 |
21 ContextMenuMatcher::ContextMenuMatcher( | 21 ContextMenuMatcher::ContextMenuMatcher( |
22 Profile* profile, | 22 Profile* profile, |
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
264 DCHECK_GE(index, 0); | 264 DCHECK_GE(index, 0); |
265 | 265 |
266 const SkBitmap& icon = menu_manager->GetIconForExtension(extension_id); | 266 const SkBitmap& icon = menu_manager->GetIconForExtension(extension_id); |
267 DCHECK(icon.width() == gfx::kFaviconSize); | 267 DCHECK(icon.width() == gfx::kFaviconSize); |
268 DCHECK(icon.height() == gfx::kFaviconSize); | 268 DCHECK(icon.height() == gfx::kFaviconSize); |
269 | 269 |
270 menu_model_->SetIcon(index, gfx::Image::CreateFrom1xBitmap(icon)); | 270 menu_model_->SetIcon(index, gfx::Image::CreateFrom1xBitmap(icon)); |
271 } | 271 } |
272 | 272 |
273 } // namespace extensions | 273 } // namespace extensions |
OLD | NEW |