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 345 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
356 public content::NotificationObserver { | 356 public content::NotificationObserver { |
357 public: | 357 public: |
358 DECLARE_EXTENSION_FUNCTION("browserAction.openPopup", | 358 DECLARE_EXTENSION_FUNCTION("browserAction.openPopup", |
359 BROWSERACTION_OPEN_POPUP) | 359 BROWSERACTION_OPEN_POPUP) |
360 BrowserActionOpenPopupFunction(); | 360 BrowserActionOpenPopupFunction(); |
361 | 361 |
362 private: | 362 private: |
363 virtual ~BrowserActionOpenPopupFunction() {} | 363 virtual ~BrowserActionOpenPopupFunction() {} |
364 | 364 |
365 // ExtensionFunction: | 365 // ExtensionFunction: |
366 virtual bool RunImpl() OVERRIDE; | 366 virtual bool RunAsync() OVERRIDE; |
367 | 367 |
368 virtual void Observe(int type, | 368 virtual void Observe(int type, |
369 const content::NotificationSource& source, | 369 const content::NotificationSource& source, |
370 const content::NotificationDetails& details) OVERRIDE; | 370 const content::NotificationDetails& details) OVERRIDE; |
371 void OpenPopupTimedOut(); | 371 void OpenPopupTimedOut(); |
372 | 372 |
373 content::NotificationRegistrar registrar_; | 373 content::NotificationRegistrar registrar_; |
374 bool response_sent_; | 374 bool response_sent_; |
375 | 375 |
376 DISALLOW_COPY_AND_ASSIGN(BrowserActionOpenPopupFunction); | 376 DISALLOW_COPY_AND_ASSIGN(BrowserActionOpenPopupFunction); |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
471 PAGEACTIONS_DISABLEFORTAB) | 471 PAGEACTIONS_DISABLEFORTAB) |
472 | 472 |
473 protected: | 473 protected: |
474 virtual ~DisablePageActionsFunction() {} | 474 virtual ~DisablePageActionsFunction() {} |
475 | 475 |
476 // ExtensionFunction: | 476 // ExtensionFunction: |
477 virtual bool RunSync() OVERRIDE; | 477 virtual bool RunSync() OVERRIDE; |
478 }; | 478 }; |
479 | 479 |
480 #endif // CHROME_BROWSER_EXTENSIONS_API_EXTENSION_ACTION_EXTENSION_ACTION_API_H
_ | 480 #endif // CHROME_BROWSER_EXTENSIONS_API_EXTENSION_ACTION_EXTENSION_ACTION_API_H
_ |
OLD | NEW |