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 333 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
344 public content::NotificationObserver { | 344 public content::NotificationObserver { |
345 public: | 345 public: |
346 DECLARE_EXTENSION_FUNCTION("browserAction.openPopup", | 346 DECLARE_EXTENSION_FUNCTION("browserAction.openPopup", |
347 BROWSERACTION_OPEN_POPUP) | 347 BROWSERACTION_OPEN_POPUP) |
348 BrowserActionOpenPopupFunction(); | 348 BrowserActionOpenPopupFunction(); |
349 | 349 |
350 private: | 350 private: |
351 virtual ~BrowserActionOpenPopupFunction() {} | 351 virtual ~BrowserActionOpenPopupFunction() {} |
352 | 352 |
353 // ExtensionFunction: | 353 // ExtensionFunction: |
354 virtual bool RunImpl() OVERRIDE; | 354 virtual bool RunAsync() OVERRIDE; |
355 | 355 |
356 virtual void Observe(int type, | 356 virtual void Observe(int type, |
357 const content::NotificationSource& source, | 357 const content::NotificationSource& source, |
358 const content::NotificationDetails& details) OVERRIDE; | 358 const content::NotificationDetails& details) OVERRIDE; |
359 void OpenPopupTimedOut(); | 359 void OpenPopupTimedOut(); |
360 | 360 |
361 content::NotificationRegistrar registrar_; | 361 content::NotificationRegistrar registrar_; |
362 bool response_sent_; | 362 bool response_sent_; |
363 | 363 |
364 DISALLOW_COPY_AND_ASSIGN(BrowserActionOpenPopupFunction); | 364 DISALLOW_COPY_AND_ASSIGN(BrowserActionOpenPopupFunction); |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
459 PAGEACTIONS_DISABLEFORTAB) | 459 PAGEACTIONS_DISABLEFORTAB) |
460 | 460 |
461 protected: | 461 protected: |
462 virtual ~DisablePageActionsFunction() {} | 462 virtual ~DisablePageActionsFunction() {} |
463 | 463 |
464 // ExtensionFunction: | 464 // ExtensionFunction: |
465 virtual bool RunSync() OVERRIDE; | 465 virtual bool RunSync() OVERRIDE; |
466 }; | 466 }; |
467 | 467 |
468 #endif // CHROME_BROWSER_EXTENSIONS_API_EXTENSION_ACTION_EXTENSION_ACTION_API_H
_ | 468 #endif // CHROME_BROWSER_EXTENSIONS_API_EXTENSION_ACTION_EXTENSION_ACTION_API_H
_ |
OLD | NEW |