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 #ifndef CHROME_BROWSER_EXTENSIONS_API_EXTENSION_ACTION_EXTENSION_ACTION_API_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_EXTENSION_ACTION_EXTENSION_ACTION_API_H_ |
6 #define CHROME_BROWSER_EXTENSIONS_API_EXTENSION_ACTION_EXTENSION_ACTION_API_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_API_EXTENSION_ACTION_EXTENSION_ACTION_API_H_ |
7 | 7 |
| 8 #include <string> |
| 9 |
8 #include "base/memory/weak_ptr.h" | 10 #include "base/memory/weak_ptr.h" |
9 #include "chrome/browser/extensions/api/profile_keyed_api_factory.h" | 11 #include "chrome/browser/extensions/api/profile_keyed_api_factory.h" |
10 #include "chrome/browser/extensions/extension_action.h" | 12 #include "chrome/browser/extensions/extension_action.h" |
11 #include "chrome/browser/extensions/extension_function.h" | 13 #include "chrome/browser/extensions/extension_function.h" |
12 #include "content/public/browser/notification_observer.h" | 14 #include "content/public/browser/notification_observer.h" |
13 #include "content/public/browser/notification_registrar.h" | 15 #include "content/public/browser/notification_registrar.h" |
14 | 16 |
15 namespace base { | 17 namespace base { |
16 class DictionaryValue; | 18 class DictionaryValue; |
17 } | 19 } |
(...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
334 }; | 336 }; |
335 | 337 |
336 class BrowserActionDisableFunction : public ExtensionActionHideFunction { | 338 class BrowserActionDisableFunction : public ExtensionActionHideFunction { |
337 public: | 339 public: |
338 DECLARE_EXTENSION_FUNCTION("browserAction.disable", BROWSERACTION_DISABLE) | 340 DECLARE_EXTENSION_FUNCTION("browserAction.disable", BROWSERACTION_DISABLE) |
339 | 341 |
340 protected: | 342 protected: |
341 virtual ~BrowserActionDisableFunction() {} | 343 virtual ~BrowserActionDisableFunction() {} |
342 }; | 344 }; |
343 | 345 |
| 346 class BrowserActionOpenPopupFunction : public SyncExtensionFunction { |
| 347 public: |
| 348 DECLARE_EXTENSION_FUNCTION("browserAction.openPopup", |
| 349 BROWSERACTION_OPEN_POPUP) |
| 350 |
| 351 protected: |
| 352 virtual ~BrowserActionOpenPopupFunction() {} |
| 353 |
| 354 // ExtensionFunction: |
| 355 virtual bool RunImpl() OVERRIDE; |
| 356 }; |
| 357 |
344 // | 358 // |
345 // scriptBadge.* aliases for supported scriptBadge APIs. | 359 // scriptBadge.* aliases for supported scriptBadge APIs. |
346 // | 360 // |
347 | 361 |
348 class ScriptBadgeSetPopupFunction : public ExtensionActionSetPopupFunction { | 362 class ScriptBadgeSetPopupFunction : public ExtensionActionSetPopupFunction { |
349 public: | 363 public: |
350 DECLARE_EXTENSION_FUNCTION("scriptBadge.setPopup", SCRIPTBADGE_SETPOPUP) | 364 DECLARE_EXTENSION_FUNCTION("scriptBadge.setPopup", SCRIPTBADGE_SETPOPUP) |
351 | 365 |
352 protected: | 366 protected: |
353 virtual ~ScriptBadgeSetPopupFunction() {} | 367 virtual ~ScriptBadgeSetPopupFunction() {} |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
468 PAGEACTIONS_DISABLEFORTAB) | 482 PAGEACTIONS_DISABLEFORTAB) |
469 | 483 |
470 protected: | 484 protected: |
471 virtual ~DisablePageActionsFunction() {} | 485 virtual ~DisablePageActionsFunction() {} |
472 | 486 |
473 // ExtensionFunction: | 487 // ExtensionFunction: |
474 virtual bool RunImpl() OVERRIDE; | 488 virtual bool RunImpl() OVERRIDE; |
475 }; | 489 }; |
476 | 490 |
477 #endif // CHROME_BROWSER_EXTENSIONS_API_EXTENSION_ACTION_EXTENSION_ACTION_API_H
_ | 491 #endif // CHROME_BROWSER_EXTENSIONS_API_EXTENSION_ACTION_EXTENSION_ACTION_API_H
_ |
OLD | NEW |