OLD | NEW |
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 CONTENT_RENDERER_PEPPER_PEPPER_HUNG_PLUGIN_FILTER_H_ | 5 #ifndef CONTENT_RENDERER_PEPPER_PEPPER_HUNG_PLUGIN_FILTER_H_ |
6 #define CONTENT_RENDERER_PEPPER_PEPPER_HUNG_PLUGIN_FILTER_H_ | 6 #define CONTENT_RENDERER_PEPPER_PEPPER_HUNG_PLUGIN_FILTER_H_ |
7 | 7 |
8 #include "base/files/file_path.h" | 8 #include "base/files/file_path.h" |
9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
10 #include "base/message_loop/message_loop_proxy.h" | 10 #include "base/message_loop/message_loop_proxy.h" |
(...skipping 22 matching lines...) Expand all Loading... |
33 public: | 33 public: |
34 // The |frame_routing_id| is the ID of the render_frame so that this class can | 34 // The |frame_routing_id| is the ID of the render_frame so that this class can |
35 // send messages to the browser via that frame's route. The |plugin_child_id| | 35 // send messages to the browser via that frame's route. The |plugin_child_id| |
36 // is the ID in the browser process of the pepper plugin process host. We use | 36 // is the ID in the browser process of the pepper plugin process host. We use |
37 // this to identify the proper plugin process to terminate. | 37 // this to identify the proper plugin process to terminate. |
38 PepperHungPluginFilter(const base::FilePath& plugin_path, | 38 PepperHungPluginFilter(const base::FilePath& plugin_path, |
39 int frame_routing_id, | 39 int frame_routing_id, |
40 int plugin_child_id); | 40 int plugin_child_id); |
41 | 41 |
42 // SyncMessageStatusReceiver implementation. | 42 // SyncMessageStatusReceiver implementation. |
43 virtual void BeginBlockOnSyncMessage() OVERRIDE; | 43 virtual void BeginBlockOnSyncMessage() override; |
44 virtual void EndBlockOnSyncMessage() OVERRIDE; | 44 virtual void EndBlockOnSyncMessage() override; |
45 | 45 |
46 // MessageFilter implementation. | 46 // MessageFilter implementation. |
47 virtual void OnFilterAdded(IPC::Sender* sender) OVERRIDE; | 47 virtual void OnFilterAdded(IPC::Sender* sender) override; |
48 virtual void OnFilterRemoved() OVERRIDE; | 48 virtual void OnFilterRemoved() override; |
49 virtual void OnChannelError() OVERRIDE; | 49 virtual void OnChannelError() override; |
50 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; | 50 virtual bool OnMessageReceived(const IPC::Message& message) override; |
51 | 51 |
52 protected: | 52 protected: |
53 virtual ~PepperHungPluginFilter(); | 53 virtual ~PepperHungPluginFilter(); |
54 | 54 |
55 private: | 55 private: |
56 // Makes sure that the hung timer is scheduled. | 56 // Makes sure that the hung timer is scheduled. |
57 void EnsureTimerScheduled(); | 57 void EnsureTimerScheduled(); |
58 | 58 |
59 // Checks whether the plugin could have transitioned from hung to unhung and | 59 // Checks whether the plugin could have transitioned from hung to unhung and |
60 // notifies the browser if so. | 60 // notifies the browser if so. |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
106 bool hung_plugin_showing_; | 106 bool hung_plugin_showing_; |
107 | 107 |
108 bool timer_task_pending_; | 108 bool timer_task_pending_; |
109 | 109 |
110 DISALLOW_COPY_AND_ASSIGN(PepperHungPluginFilter); | 110 DISALLOW_COPY_AND_ASSIGN(PepperHungPluginFilter); |
111 }; | 111 }; |
112 | 112 |
113 } // namespace content | 113 } // namespace content |
114 | 114 |
115 #endif // CONTENT_RENDERER_PEPPER_PEPPER_HUNG_PLUGIN_FILTER_H_ | 115 #endif // CONTENT_RENDERER_PEPPER_PEPPER_HUNG_PLUGIN_FILTER_H_ |
OLD | NEW |