| 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_menu_manager.h" | 5 #include "chrome/browser/extensions/extension_menu_manager.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "base/json/json_writer.h" | 9 #include "base/json/json_writer.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| 11 #include "base/stl_util.h" | 11 #include "base/stl_util.h" |
| 12 #include "base/string_util.h" | 12 #include "base/string_util.h" |
| 13 #include "base/utf_string_conversions.h" | 13 #include "base/utf_string_conversions.h" |
| 14 #include "base/values.h" | 14 #include "base/values.h" |
| 15 #include "chrome/browser/extensions/extension_event_router.h" | 15 #include "chrome/browser/extensions/extension_event_router.h" |
| 16 #include "chrome/browser/extensions/extension_tab_util.h" | 16 #include "chrome/browser/extensions/extension_tab_util.h" |
| 17 #include "chrome/browser/profiles/profile.h" | 17 #include "chrome/browser/profiles/profile.h" |
| 18 #include "chrome/common/chrome_notification_types.h" | 18 #include "chrome/common/chrome_notification_types.h" |
| 19 #include "chrome/common/extensions/extension.h" | 19 #include "chrome/common/extensions/extension.h" |
| 20 #include "content/common/notification_service.h" | 20 #include "content/public/browser/notification_details.h" |
| 21 #include "content/public/browser/notification_source.h" |
| 21 #include "ui/base/text/text_elider.h" | 22 #include "ui/base/text/text_elider.h" |
| 22 #include "ui/gfx/favicon_size.h" | 23 #include "ui/gfx/favicon_size.h" |
| 23 #include "webkit/glue/context_menu.h" | 24 #include "webkit/glue/context_menu.h" |
| 24 | 25 |
| 25 ExtensionMenuItem::ExtensionMenuItem(const Id& id, | 26 ExtensionMenuItem::ExtensionMenuItem(const Id& id, |
| 26 const std::string& title, | 27 const std::string& title, |
| 27 bool checked, | 28 bool checked, |
| 28 Type type, | 29 Type type, |
| 29 const ContextList& contexts) | 30 const ContextList& contexts) |
| 30 : id_(id), | 31 : id_(id), |
| (...skipping 461 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 492 if (profile < other.profile) | 493 if (profile < other.profile) |
| 493 return true; | 494 return true; |
| 494 if (profile == other.profile) { | 495 if (profile == other.profile) { |
| 495 if (extension_id < other.extension_id) | 496 if (extension_id < other.extension_id) |
| 496 return true; | 497 return true; |
| 497 if (extension_id == other.extension_id) | 498 if (extension_id == other.extension_id) |
| 498 return uid < other.uid; | 499 return uid < other.uid; |
| 499 } | 500 } |
| 500 return false; | 501 return false; |
| 501 } | 502 } |
| OLD | NEW |