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/menu_manager.h" | 5 #include "chrome/browser/extensions/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" |
(...skipping 643 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
654 properties->SetBoolean("editable", params.is_editable); | 654 properties->SetBoolean("editable", params.is_editable); |
655 | 655 |
656 WebViewGuest* webview_guest = WebViewGuest::FromWebContents(web_contents); | 656 WebViewGuest* webview_guest = WebViewGuest::FromWebContents(web_contents); |
657 if (webview_guest) { | 657 if (webview_guest) { |
658 // This is used in web_view_internalcustom_bindings.js. | 658 // This is used in web_view_internalcustom_bindings.js. |
659 // The property is not exposed to developer API. | 659 // The property is not exposed to developer API. |
660 properties->SetInteger("webviewInstanceId", | 660 properties->SetInteger("webviewInstanceId", |
661 webview_guest->view_instance_id()); | 661 webview_guest->view_instance_id()); |
662 } | 662 } |
663 | 663 |
664 if (params.extension_id.length() > 0) | |
Devlin
2014/07/01 20:54:24
nit: prefer "!params.extension_id.empty()"
| |
665 properties->SetString("extension_id", params.extension_id); | |
Devlin
2014/07/01 20:54:24
it looks like we prefer camelCaseStyle for these k
| |
666 | |
664 args->Append(properties); | 667 args->Append(properties); |
665 | 668 |
666 // Add the tab info to the argument list. | 669 // Add the tab info to the argument list. |
667 // No tab info in a platform app. | 670 // No tab info in a platform app. |
668 if (!extension || !extension->is_platform_app()) { | 671 if (!extension || !extension->is_platform_app()) { |
669 // Note: web_contents are NULL in unit tests :( | 672 // Note: web_contents are NULL in unit tests :( |
670 if (web_contents) { | 673 if (web_contents) { |
671 args->Append(ExtensionTabUtil::CreateTabValue(web_contents)); | 674 args->Append(ExtensionTabUtil::CreateTabValue(web_contents)); |
672 } else { | 675 } else { |
673 args->Append(new base::DictionaryValue()); | 676 args->Append(new base::DictionaryValue()); |
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
943 if (uid < other.uid) | 946 if (uid < other.uid) |
944 return true; | 947 return true; |
945 if (uid == other.uid) | 948 if (uid == other.uid) |
946 return string_uid < other.string_uid; | 949 return string_uid < other.string_uid; |
947 } | 950 } |
948 } | 951 } |
949 return false; | 952 return false; |
950 } | 953 } |
951 | 954 |
952 } // namespace extensions | 955 } // namespace extensions |
OLD | NEW |