Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #include "chrome/browser/extensions/api/extension_action/script_badge_api.h" | |
| 6 | |
| 7 #include "chrome/browser/extensions/api/extension_action/script_badge_api_factor y.h" | |
|
Yoyo Zhou
2012/12/18 02:01:41
This file seems to be missing.
Devlin
2012/12/18 20:42:07
Whoops; forgot to include that one in the cl. Adde
| |
| 8 #include "chrome/browser/extensions/location_bar_controller.h" | |
| 9 #include "chrome/browser/extensions/tab_helper.h" | |
| 10 #include "chrome/common/extensions/api/extension_action/script_badge_handler.h" | |
| 11 #include "chrome/common/extensions/extension_manifest_constants.h" | |
| 12 #include "content/public/browser/web_contents.h" | |
| 13 | |
| 14 namespace extensions { | |
| 15 | |
| 16 ScriptBadgeAPI::ScriptBadgeAPI(Profile* profile) { | |
| 17 ManifestHandler::Register(extension_manifest_keys::kScriptBadge, | |
| 18 new ScriptBadgeHandler); | |
| 19 } | |
| 20 | |
| 21 ScriptBadgeAPI::~ScriptBadgeAPI() { | |
| 22 } | |
| 23 | |
| 24 void ScriptBadgeAPI::Shutdown() { | |
| 25 } | |
| 26 | |
| 27 // static | |
| 28 ScriptBadgeAPI* ScriptBadgeAPI::Get(Profile* profile) { | |
| 29 return ScriptBadgeAPIFactory::GetForProfile(profile); | |
| 30 } | |
| 31 | |
| 32 ScriptBadgeGetAttentionFunction::~ScriptBadgeGetAttentionFunction() {} | |
| 33 | |
| 34 bool ScriptBadgeGetAttentionFunction::RunExtensionAction() { | |
| 35 tab_helper().location_bar_controller()->GetAttentionFor(extension_id()); | |
| 36 return true; | |
| 37 } | |
| 38 | |
| 39 } // namespace extensions | |
| OLD | NEW |