| 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> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/memory/weak_ptr.h" | 10 #include "base/memory/weak_ptr.h" |
| (...skipping 449 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 460 | 460 |
| 461 class PageActionGetPopupFunction | 461 class PageActionGetPopupFunction |
| 462 : public extensions::ExtensionActionGetPopupFunction { | 462 : public extensions::ExtensionActionGetPopupFunction { |
| 463 public: | 463 public: |
| 464 DECLARE_EXTENSION_FUNCTION("pageAction.getPopup", PAGEACTION_GETPOPUP) | 464 DECLARE_EXTENSION_FUNCTION("pageAction.getPopup", PAGEACTION_GETPOPUP) |
| 465 | 465 |
| 466 protected: | 466 protected: |
| 467 virtual ~PageActionGetPopupFunction() {} | 467 virtual ~PageActionGetPopupFunction() {} |
| 468 }; | 468 }; |
| 469 | 469 |
| 470 // Base class for deprecated page actions APIs | |
| 471 class PageActionsFunction : public ChromeSyncExtensionFunction { | |
| 472 protected: | |
| 473 PageActionsFunction(); | |
| 474 virtual ~PageActionsFunction(); | |
| 475 bool SetPageActionEnabled(bool enable); | |
| 476 }; | |
| 477 | |
| 478 // Implement chrome.pageActions.enableForTab(). | |
| 479 class EnablePageActionsFunction : public PageActionsFunction { | |
| 480 public: | |
| 481 DECLARE_EXTENSION_FUNCTION("pageActions.enableForTab", | |
| 482 PAGEACTIONS_ENABLEFORTAB) | |
| 483 | |
| 484 protected: | |
| 485 virtual ~EnablePageActionsFunction() {} | |
| 486 | |
| 487 // ExtensionFunction: | |
| 488 virtual bool RunSync() OVERRIDE; | |
| 489 }; | |
| 490 | |
| 491 // Implement chrome.pageActions.disableForTab(). | |
| 492 class DisablePageActionsFunction : public PageActionsFunction { | |
| 493 public: | |
| 494 DECLARE_EXTENSION_FUNCTION("pageActions.disableForTab", | |
| 495 PAGEACTIONS_DISABLEFORTAB) | |
| 496 | |
| 497 protected: | |
| 498 virtual ~DisablePageActionsFunction() {} | |
| 499 | |
| 500 // ExtensionFunction: | |
| 501 virtual bool RunSync() OVERRIDE; | |
| 502 }; | |
| 503 | |
| 504 #endif // CHROME_BROWSER_EXTENSIONS_API_EXTENSION_ACTION_EXTENSION_ACTION_API_H
_ | 470 #endif // CHROME_BROWSER_EXTENSIONS_API_EXTENSION_ACTION_EXTENSION_ACTION_API_H
_ |
| OLD | NEW |