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

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: please review 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 <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
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
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 _
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698