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

Side by Side Diff: chrome/browser/renderer_host/plugin_info_message_filter.h

Issue 10071036: RefCounted types should not have public destructors, chrome/browser/ part 6 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Implementation fixes Created 8 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) 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_RENDERER_HOST_PLUGIN_INFO_MESSAGE_FILTER_H_ 5 #ifndef CHROME_BROWSER_RENDERER_HOST_PLUGIN_INFO_MESSAGE_FILTER_H_
6 #define CHROME_BROWSER_RENDERER_HOST_PLUGIN_INFO_MESSAGE_FILTER_H_ 6 #define CHROME_BROWSER_RENDERER_HOST_PLUGIN_INFO_MESSAGE_FILTER_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
11 11
12 #include "base/compiler_specific.h" 12 #include "base/compiler_specific.h"
13 #include "base/memory/weak_ptr.h" 13 #include "base/memory/weak_ptr.h"
14 #include "base/sequenced_task_runner_helpers.h"
14 #include "chrome/browser/prefs/pref_member.h" 15 #include "chrome/browser/prefs/pref_member.h"
15 #include "chrome/common/content_settings.h" 16 #include "chrome/common/content_settings.h"
16 #include "content/public/browser/browser_message_filter.h" 17 #include "content/public/browser/browser_message_filter.h"
17 18
18 struct ChromeViewHostMsg_GetPluginInfo_Status; 19 struct ChromeViewHostMsg_GetPluginInfo_Status;
19 class GURL; 20 class GURL;
20 class HostContentSettingsMap; 21 class HostContentSettingsMap;
21 class PluginFinder; 22 class PluginFinder;
22 class Profile; 23 class Profile;
23 24
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 private: 68 private:
68 int render_process_id_; 69 int render_process_id_;
69 content::ResourceContext* resource_context_; 70 content::ResourceContext* resource_context_;
70 const HostContentSettingsMap* host_content_settings_map_; 71 const HostContentSettingsMap* host_content_settings_map_;
71 72
72 BooleanPrefMember allow_outdated_plugins_; 73 BooleanPrefMember allow_outdated_plugins_;
73 BooleanPrefMember always_authorize_plugins_; 74 BooleanPrefMember always_authorize_plugins_;
74 }; 75 };
75 76
76 PluginInfoMessageFilter(int render_process_id, Profile* profile); 77 PluginInfoMessageFilter(int render_process_id, Profile* profile);
77 virtual ~PluginInfoMessageFilter();
78 78
79 // content::BrowserMessageFilter methods: 79 // content::BrowserMessageFilter methods:
80 virtual bool OnMessageReceived(const IPC::Message& message, 80 virtual bool OnMessageReceived(const IPC::Message& message,
81 bool* message_was_ok) OVERRIDE; 81 bool* message_was_ok) OVERRIDE;
82 virtual void OnDestruct() const OVERRIDE; 82 virtual void OnDestruct() const OVERRIDE;
83 83
84 private: 84 private:
85 friend struct content::BrowserThread::DeleteOnThread<
86 content::BrowserThread::UI>;
87 friend class base::DeleteHelper<PluginInfoMessageFilter>;
88
89 virtual ~PluginInfoMessageFilter();
90
85 void OnGetPluginInfo(int render_view_id, 91 void OnGetPluginInfo(int render_view_id,
86 const GURL& url, 92 const GURL& url,
87 const GURL& top_origin_url, 93 const GURL& top_origin_url,
88 const std::string& mime_type, 94 const std::string& mime_type,
89 IPC::Message* reply_msg); 95 IPC::Message* reply_msg);
90 96
91 // |params| wraps the parameters passed to |OnGetPluginInfo|, because 97 // |params| wraps the parameters passed to |OnGetPluginInfo|, because
92 // |base::Bind| doesn't support the required arity <http://crbug.com/98542>. 98 // |base::Bind| doesn't support the required arity <http://crbug.com/98542>.
93 void PluginsLoaded(const GetPluginInfo_Params& params, 99 void PluginsLoaded(const GetPluginInfo_Params& params,
94 IPC::Message* reply_msg, 100 IPC::Message* reply_msg,
95 const std::vector<webkit::WebPluginInfo>& plugins); 101 const std::vector<webkit::WebPluginInfo>& plugins);
96 102
97 void GotPluginFinder(const GetPluginInfo_Params& params, 103 void GotPluginFinder(const GetPluginInfo_Params& params,
98 IPC::Message* reply_msg, 104 IPC::Message* reply_msg,
99 const webkit::WebPluginInfo& plugin, 105 const webkit::WebPluginInfo& plugin,
100 const std::string& actual_mime_type, 106 const std::string& actual_mime_type,
101 PluginFinder* plugin_finder); 107 PluginFinder* plugin_finder);
102 108
103 Context context_; 109 Context context_;
104 110
105 base::WeakPtrFactory<PluginInfoMessageFilter> weak_ptr_factory_; 111 base::WeakPtrFactory<PluginInfoMessageFilter> weak_ptr_factory_;
106 112
107 DISALLOW_COPY_AND_ASSIGN(PluginInfoMessageFilter); 113 DISALLOW_COPY_AND_ASSIGN(PluginInfoMessageFilter);
108 }; 114 };
109 115
110 #endif // CHROME_BROWSER_RENDERER_HOST_PLUGIN_INFO_MESSAGE_FILTER_H_ 116 #endif // CHROME_BROWSER_RENDERER_HOST_PLUGIN_INFO_MESSAGE_FILTER_H_
OLDNEW
« no previous file with comments | « chrome/browser/prerender/prerender_browsertest.cc ('k') | chrome/browser/renderer_host/plugin_info_message_filter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698