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/ui/toolbar/action_box_menu_model.h" | 5 #include "chrome/browser/ui/toolbar/action_box_menu_model.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "base/utf_string_conversions.h" | 8 #include "base/strings/utf_string_conversions.h" |
9 #include "chrome/browser/extensions/extension_service.h" | 9 #include "chrome/browser/extensions/extension_service.h" |
10 #include "chrome/browser/extensions/extension_system.h" | 10 #include "chrome/browser/extensions/extension_system.h" |
11 #include "chrome/browser/extensions/extension_toolbar_model.h" | 11 #include "chrome/browser/extensions/extension_toolbar_model.h" |
12 #include "chrome/common/extensions/api/extension_action/action_info.h" | 12 #include "chrome/common/extensions/api/extension_action/action_info.h" |
13 | 13 |
14 | 14 |
15 using extensions::ActionInfo; | 15 using extensions::ActionInfo; |
16 | 16 |
17 //////////////////////////////////////////////////////////////////////////////// | 17 //////////////////////////////////////////////////////////////////////////////// |
18 // ActionBoxMenuModel | 18 // ActionBoxMenuModel |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 extension_ids_[index_in_extension_ids]); | 58 extension_ids_[index_in_extension_ids]); |
59 } | 59 } |
60 | 60 |
61 void ActionBoxMenuModel::ExecuteCommand(int command_id) { | 61 void ActionBoxMenuModel::ExecuteCommand(int command_id) { |
62 delegate()->ExecuteCommand(command_id, 0); | 62 delegate()->ExecuteCommand(command_id, 0); |
63 } | 63 } |
64 | 64 |
65 int ActionBoxMenuModel::GetFirstExtensionIndex() { | 65 int ActionBoxMenuModel::GetFirstExtensionIndex() { |
66 return GetItemCount() - extension_ids_.size(); | 66 return GetItemCount() - extension_ids_.size(); |
67 } | 67 } |
OLD | NEW |