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

Side by Side Diff: chrome/browser/pepper_flash_settings_manager.cc

Issue 10553010: Rename IPC::Channel and IPC::Sender in src/chrome. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 6 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 #include "chrome/browser/pepper_flash_settings_manager.h" 5 #include "chrome/browser/pepper_flash_settings_manager.h"
6 6
7 #include <map> 7 #include <map>
8 #include <utility> 8 #include <utility>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 12 matching lines...) Expand all
23 #include "content/public/common/content_constants.h" 23 #include "content/public/common/content_constants.h"
24 #include "googleurl/src/gurl.h" 24 #include "googleurl/src/gurl.h"
25 #include "ipc/ipc_channel.h" 25 #include "ipc/ipc_channel.h"
26 #include "ppapi/proxy/ppapi_messages.h" 26 #include "ppapi/proxy/ppapi_messages.h"
27 #include "webkit/plugins/plugin_constants.h" 27 #include "webkit/plugins/plugin_constants.h"
28 #include "webkit/plugins/webplugininfo.h" 28 #include "webkit/plugins/webplugininfo.h"
29 29
30 using content::BrowserThread; 30 using content::BrowserThread;
31 31
32 class PepperFlashSettingsManager::Core 32 class PepperFlashSettingsManager::Core
33 : public IPC::Channel::Listener, 33 : public IPC::Listener,
34 public base::RefCountedThreadSafe<Core, BrowserThread::DeleteOnIOThread> { 34 public base::RefCountedThreadSafe<Core, BrowserThread::DeleteOnIOThread> {
35 public: 35 public:
36 Core(PepperFlashSettingsManager* manager, 36 Core(PepperFlashSettingsManager* manager,
37 content::BrowserContext* browser_context); 37 content::BrowserContext* browser_context);
38 38
39 // Stops sending notifications to |manager_| and sets it to NULL. 39 // Stops sending notifications to |manager_| and sets it to NULL.
40 void Detach(); 40 void Detach();
41 41
42 void DeauthorizeContentLicenses(uint32 request_id); 42 void DeauthorizeContentLicenses(uint32 request_id);
43 void GetPermissionSettings( 43 void GetPermissionSettings(
44 uint32 request_id, 44 uint32 request_id,
45 PP_Flash_BrowserOperations_SettingType setting_type); 45 PP_Flash_BrowserOperations_SettingType setting_type);
46 void SetDefaultPermission( 46 void SetDefaultPermission(
47 uint32 request_id, 47 uint32 request_id,
48 PP_Flash_BrowserOperations_SettingType setting_type, 48 PP_Flash_BrowserOperations_SettingType setting_type,
49 PP_Flash_BrowserOperations_Permission permission, 49 PP_Flash_BrowserOperations_Permission permission,
50 bool clear_site_specific); 50 bool clear_site_specific);
51 void SetSitePermission(uint32 request_id, 51 void SetSitePermission(uint32 request_id,
52 PP_Flash_BrowserOperations_SettingType setting_type, 52 PP_Flash_BrowserOperations_SettingType setting_type,
53 const ppapi::FlashSiteSettings& sites); 53 const ppapi::FlashSiteSettings& sites);
54 54
55 // IPC::Channel::Listener implementation. 55 // IPC::Listener implementation.
56 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; 56 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
57 virtual void OnChannelError() OVERRIDE; 57 virtual void OnChannelError() OVERRIDE;
58 58
59 private: 59 private:
60 friend struct BrowserThread::DeleteOnThread<BrowserThread::IO>; 60 friend struct BrowserThread::DeleteOnThread<BrowserThread::IO>;
61 friend class base::DeleteHelper<Core>; 61 friend class base::DeleteHelper<Core>;
62 62
63 enum RequestType { 63 enum RequestType {
64 INVALID_REQUEST_TYPE = 0, 64 INVALID_REQUEST_TYPE = 0,
65 DEAUTHORIZE_CONTENT_LICENSES, 65 DEAUTHORIZE_CONTENT_LICENSES,
(...skipping 660 matching lines...) Expand 10 before | Expand all | Expand 10 after
726 726
727 void PepperFlashSettingsManager::OnError() { 727 void PepperFlashSettingsManager::OnError() {
728 if (core_.get()) { 728 if (core_.get()) {
729 core_->Detach(); 729 core_->Detach();
730 core_ = NULL; 730 core_ = NULL;
731 } else { 731 } else {
732 NOTREACHED(); 732 NOTREACHED();
733 } 733 }
734 } 734 }
735 735
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698