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

Side by Side Diff: chrome/browser/extensions/extension_popup_api.h

Issue 6334101: Removal of chrome.experimental.popup set of APIs (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 10 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 | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_POPUP_API_H_
6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_POPUP_API_H_
7 #pragma once
8
9 #include "chrome/browser/extensions/extension_function.h"
10 #include "chrome/common/notification_observer.h"
11 #include "chrome/common/notification_registrar.h"
12
13 class Profile;
14 class ExtensionPopup;
15
16 // This extension function shows a pop-up extension view. It is asynchronous
17 // because the callback must be invoked only after the associated render
18 // process/view has been created and fully initialized.
19 class PopupShowFunction : public AsyncExtensionFunction,
20 public NotificationObserver {
21 public:
22 PopupShowFunction();
23
24 virtual void Run();
25 virtual bool RunImpl();
26 DECLARE_EXTENSION_FUNCTION_NAME("experimental.popup.show")
27
28 private:
29 // NotificationObserver methods.
30 virtual void Observe(NotificationType type,
31 const NotificationSource& source,
32 const NotificationDetails& details);
33 NotificationRegistrar registrar_;
34
35 #if defined(TOOLKIT_VIEWS)
36 // The pop-up view created by this function, saved for access during
37 // event notification. The pop-up is not owned by the PopupShowFunction
38 // instance.
39 ExtensionPopup* popup_;
40 #endif
41 };
42
43 // Event router class for events related to the chrome.popup.* set of APIs.
44 class PopupEventRouter {
45 public:
46 static void OnPopupClosed(Profile* profile,
47 int routing_id);
48 private:
49 DISALLOW_COPY_AND_ASSIGN(PopupEventRouter);
50 };
51
52 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_POPUP_API_H_
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_function_dispatcher.cc ('k') | chrome/browser/extensions/extension_popup_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698