OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_page_actions_module.h" | 5 #include "chrome/browser/extensions/extension_page_actions_module.h" |
6 | 6 |
7 #include "base/string_number_conversions.h" | 7 #include "base/string_number_conversions.h" |
8 #include "chrome/browser/browser_list.h" | 8 #include "chrome/browser/browser_list.h" |
9 #include "chrome/browser/extensions/extension_page_actions_module_constants.h" | 9 #include "chrome/browser/extensions/extension_page_actions_module_constants.h" |
10 #include "chrome/browser/extensions/extension_tabs_module.h" | 10 #include "chrome/browser/extensions/extension_tabs_module.h" |
11 #include "chrome/browser/extensions/extensions_service.h" | 11 #include "chrome/browser/extensions/extension_service.h" |
12 #include "chrome/browser/profiles/profile.h" | 12 #include "chrome/browser/profiles/profile.h" |
13 #include "chrome/browser/tab_contents/navigation_entry.h" | 13 #include "chrome/browser/tab_contents/navigation_entry.h" |
14 #include "chrome/browser/tab_contents/tab_contents.h" | 14 #include "chrome/browser/tab_contents/tab_contents.h" |
15 #include "chrome/browser/ui/browser.h" | 15 #include "chrome/browser/ui/browser.h" |
16 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" | 16 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" |
17 #include "chrome/common/extensions/extension.h" | 17 #include "chrome/common/extensions/extension.h" |
18 #include "chrome/common/extensions/extension_action.h" | 18 #include "chrome/common/extensions/extension_action.h" |
19 #include "chrome/common/extensions/extension_error_utils.h" | 19 #include "chrome/common/extensions/extension_error_utils.h" |
20 #include "chrome/common/render_messages.h" | 20 #include "chrome/common/render_messages.h" |
21 | 21 |
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
281 if (!InitCommon(tab_id)) | 281 if (!InitCommon(tab_id)) |
282 return false; | 282 return false; |
283 | 283 |
284 std::string text; | 284 std::string text; |
285 EXTENSION_FUNCTION_VALIDATE(args->GetString("text", &text)); | 285 EXTENSION_FUNCTION_VALIDATE(args->GetString("text", &text)); |
286 | 286 |
287 page_action_->SetBadgeText(tab_id, text); | 287 page_action_->SetBadgeText(tab_id, text); |
288 contents_->PageActionStateChanged(); | 288 contents_->PageActionStateChanged(); |
289 return true; | 289 return true; |
290 } | 290 } |
OLD | NEW |