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/renderer/extensions/extension_process_bindings.h

Issue 8343079: Don't close background pages if there is a pending response (callback). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sync Created 9 years, 1 month 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
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 // Exposes extension APIs into the extension process. 5 // Exposes extension APIs into the extension process.
6 6
7 #ifndef CHROME_RENDERER_EXTENSIONS_EXTENSION_PROCESS_BINDINGS_H_ 7 #ifndef CHROME_RENDERER_EXTENSIONS_EXTENSION_PROCESS_BINDINGS_H_
8 #define CHROME_RENDERER_EXTENSIONS_EXTENSION_PROCESS_BINDINGS_H_ 8 #define CHROME_RENDERER_EXTENSIONS_EXTENSION_PROCESS_BINDINGS_H_
9 #pragma once 9 #pragma once
10 10
11 #include <string> 11 #include <string>
12 12
13 class ExtensionDispatcher; 13 class ExtensionDispatcher;
14 class ChromeV8ContextSet; 14 class ChromeV8ContextSet;
15 class GURL; 15 class GURL;
16 class URLPattern; 16 class URLPattern;
17 17
18 namespace WebKit { 18 namespace WebKit {
19 class WebView; 19 class WebView;
20 } 20 }
21 21
22 namespace v8 { 22 namespace v8 {
23 class Extension; 23 class Extension;
24 } 24 }
25 25
26 class ExtensionProcessBindings { 26 class ExtensionProcessBindings {
27 public: 27 public:
28 static v8::Extension* Get(ExtensionDispatcher* extension_dispatcher); 28 static v8::Extension* Get(ExtensionDispatcher* extension_dispatcher);
29 29
30 // Handles a response to an API request. 30 // Handles a response to an API request. Sets |extension_id|.
31 static void HandleResponse(const ChromeV8ContextSet& contexts, 31 static void HandleResponse(const ChromeV8ContextSet& contexts,
32 int request_id, 32 int request_id,
33 bool success, 33 bool success,
34 const std::string& response, 34 const std::string& response,
35 const std::string& error); 35 const std::string& error,
36 std::string* extension_id);
37
38 static bool HasPendingRequests(const std::string& extension_id);
36 }; 39 };
37 40
38 #endif // CHROME_RENDERER_EXTENSIONS_EXTENSION_PROCESS_BINDINGS_H_ 41 #endif // CHROME_RENDERER_EXTENSIONS_EXTENSION_PROCESS_BINDINGS_H_
OLDNEW
« no previous file with comments | « chrome/renderer/extensions/extension_helper.cc ('k') | chrome/renderer/extensions/extension_process_bindings.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698