Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(265)

Side by Side Diff: chrome/browser/extensions/api/extension_action/extension_action_api.h

Issue 25305002: Implement initial chrome.browserAction.openPopup API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 "base/memory/weak_ptr.h" 8 #include "base/memory/weak_ptr.h"
9 #include "chrome/browser/extensions/api/profile_keyed_api_factory.h" 9 #include "chrome/browser/extensions/api/profile_keyed_api_factory.h"
10 #include "chrome/browser/extensions/extension_action.h" 10 #include "chrome/browser/extensions/extension_action.h"
(...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after
334 }; 334 };
335 335
336 class BrowserActionDisableFunction : public ExtensionActionHideFunction { 336 class BrowserActionDisableFunction : public ExtensionActionHideFunction {
337 public: 337 public:
338 DECLARE_EXTENSION_FUNCTION("browserAction.disable", BROWSERACTION_DISABLE) 338 DECLARE_EXTENSION_FUNCTION("browserAction.disable", BROWSERACTION_DISABLE)
339 339
340 protected: 340 protected:
341 virtual ~BrowserActionDisableFunction() {} 341 virtual ~BrowserActionDisableFunction() {}
342 }; 342 };
343 343
344 class BrowserActionOpenPopupFunction : public SyncExtensionFunction {
345 public:
346 DECLARE_EXTENSION_FUNCTION("browserAction.openPopup", BROWSERACTION_OPEN_POPUP )
347
348 protected:
349 virtual ~BrowserActionOpenPopupFunction() {}
350
351 // ExtensionFunction:
352 virtual bool RunImpl() OVERRIDE;
353 };
354
344 // 355 //
345 // scriptBadge.* aliases for supported scriptBadge APIs. 356 // scriptBadge.* aliases for supported scriptBadge APIs.
346 // 357 //
347 358
348 class ScriptBadgeSetPopupFunction : public ExtensionActionSetPopupFunction { 359 class ScriptBadgeSetPopupFunction : public ExtensionActionSetPopupFunction {
349 public: 360 public:
350 DECLARE_EXTENSION_FUNCTION("scriptBadge.setPopup", SCRIPTBADGE_SETPOPUP) 361 DECLARE_EXTENSION_FUNCTION("scriptBadge.setPopup", SCRIPTBADGE_SETPOPUP)
351 362
352 protected: 363 protected:
353 virtual ~ScriptBadgeSetPopupFunction() {} 364 virtual ~ScriptBadgeSetPopupFunction() {}
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
468 PAGEACTIONS_DISABLEFORTAB) 479 PAGEACTIONS_DISABLEFORTAB)
469 480
470 protected: 481 protected:
471 virtual ~DisablePageActionsFunction() {} 482 virtual ~DisablePageActionsFunction() {}
472 483
473 // ExtensionFunction: 484 // ExtensionFunction:
474 virtual bool RunImpl() OVERRIDE; 485 virtual bool RunImpl() OVERRIDE;
475 }; 486 };
476 487
477 #endif // CHROME_BROWSER_EXTENSIONS_API_EXTENSION_ACTION_EXTENSION_ACTION_API_H _ 488 #endif // CHROME_BROWSER_EXTENSIONS_API_EXTENSION_ACTION_EXTENSION_ACTION_API_H _
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698