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

Side by Side Diff: content/browser/in_process_webkit/dom_storage_message_filter.h

Issue 6915017: Chrome side to allow WebKit layer to use WebPermissionClient to check if access to local storage ... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 7 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
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 #ifndef CONTENT_BROWSER_IN_PROCESS_WEBKIT_DOM_STORAGE_MESSAGE_FILTER_H_ 5 #ifndef CONTENT_BROWSER_IN_PROCESS_WEBKIT_DOM_STORAGE_MESSAGE_FILTER_H_
6 #define CONTENT_BROWSER_IN_PROCESS_WEBKIT_DOM_STORAGE_MESSAGE_FILTER_H_ 6 #define CONTENT_BROWSER_IN_PROCESS_WEBKIT_DOM_STORAGE_MESSAGE_FILTER_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "base/process.h" 10 #include "base/process.h"
11 #include "base/tracked.h" 11 #include "base/tracked.h"
12 #include "chrome/browser/content_settings/host_content_settings_map.h"
13 #include "content/browser/browser_message_filter.h" 12 #include "content/browser/browser_message_filter.h"
14 #include "content/browser/in_process_webkit/dom_storage_area.h" 13 #include "content/browser/in_process_webkit/dom_storage_area.h"
15 #include "content/browser/in_process_webkit/webkit_context.h" 14 #include "content/browser/in_process_webkit/webkit_context.h"
16 #include "content/common/dom_storage_common.h" 15 #include "content/common/dom_storage_common.h"
17 16
18 class DOMStorageContext; 17 class DOMStorageContext;
19 class GURL; 18 class GURL;
20 struct DOMStorageMsg_Event_Params; 19 struct DOMStorageMsg_Event_Params;
21 20
22 // This class handles the logistics of DOM Storage within the browser process. 21 // This class handles the logistics of DOM Storage within the browser process.
23 // It mostly ferries information between IPCs and the WebKit implementations, 22 // It mostly ferries information between IPCs and the WebKit implementations,
24 // but it also handles some special cases like when renderer processes die. 23 // but it also handles some special cases like when renderer processes die.
25 class DOMStorageMessageFilter : public BrowserMessageFilter { 24 class DOMStorageMessageFilter : public BrowserMessageFilter {
26 public: 25 public:
27 // Only call the constructor from the UI thread. 26 // Only call the constructor from the UI thread.
28 DOMStorageMessageFilter(int process_id, WebKitContext* webkit_context, 27 DOMStorageMessageFilter(int process_id, WebKitContext* webkit_context);
29 HostContentSettingsMap* host_content_settings_map);
30 28
31 // BrowserMessageFilter implementation 29 // BrowserMessageFilter implementation
32 virtual void OnChannelConnected(int32 peer_pid); 30 virtual void OnChannelConnected(int32 peer_pid);
33 virtual void OverrideThreadForMessage(const IPC::Message& message, 31 virtual void OverrideThreadForMessage(const IPC::Message& message,
34 BrowserThread::ID* thread); 32 BrowserThread::ID* thread);
35 virtual bool OnMessageReceived(const IPC::Message& message, 33 virtual bool OnMessageReceived(const IPC::Message& message,
36 bool* message_was_ok); 34 bool* message_was_ok);
37 virtual void OnDestruct() const; 35 virtual void OnDestruct() const;
38 36
39 // Only call on the WebKit thread. 37 // Only call on the WebKit thread.
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 // Only access on the WebKit thread! Used for storage events. 79 // Only access on the WebKit thread! Used for storage events.
82 static DOMStorageMessageFilter* storage_event_message_filter; 80 static DOMStorageMessageFilter* storage_event_message_filter;
83 static const GURL* storage_event_url_; 81 static const GURL* storage_event_url_;
84 82
85 // Data shared between renderer processes with the same profile. 83 // Data shared between renderer processes with the same profile.
86 scoped_refptr<WebKitContext> webkit_context_; 84 scoped_refptr<WebKitContext> webkit_context_;
87 85
88 // Used to dispatch messages to the correct view host. 86 // Used to dispatch messages to the correct view host.
89 int process_id_; 87 int process_id_;
90 88
91 scoped_refptr<HostContentSettingsMap> host_content_settings_map_;
92
93 DISALLOW_IMPLICIT_CONSTRUCTORS(DOMStorageMessageFilter); 89 DISALLOW_IMPLICIT_CONSTRUCTORS(DOMStorageMessageFilter);
94 }; 90 };
95 91
96 #endif // CONTENT_BROWSER_IN_PROCESS_WEBKIT_DOM_STORAGE_MESSAGE_FILTER_H_ 92 #endif // CONTENT_BROWSER_IN_PROCESS_WEBKIT_DOM_STORAGE_MESSAGE_FILTER_H_
OLDNEW
« no previous file with comments | « content/browser/in_process_webkit/dom_storage_area.cc ('k') | content/browser/in_process_webkit/dom_storage_message_filter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698