| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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_RENDEDER_HOST_RENDER_WIDGET_HELPER_H_ | 5 #ifndef CHROME_BROWSER_RENDEDER_HOST_RENDER_WIDGET_HELPER_H_ |
| 6 #define CHROME_BROWSER_RENDEDER_HOST_RENDER_WIDGET_HELPER_H_ | 6 #define CHROME_BROWSER_RENDEDER_HOST_RENDER_WIDGET_HELPER_H_ |
| 7 | 7 |
| 8 #include "base/atomic_sequence_num.h" | 8 #include "base/atomic_sequence_num.h" |
| 9 #include "base/hash_tables.h" | 9 #include "base/hash_tables.h" |
| 10 #include "base/process.h" | 10 #include "base/process.h" |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 79 // On some platforms (currently the Mac) the renderer cannot create transport | 79 // On some platforms (currently the Mac) the renderer cannot create transport |
| 80 // DIBs because of sandbox limitations. Thus, it has to make synchronous IPCs | 80 // DIBs because of sandbox limitations. Thus, it has to make synchronous IPCs |
| 81 // to the browser for them. Since these requests are synchronous, they cannot | 81 // to the browser for them. Since these requests are synchronous, they cannot |
| 82 // terminate on the UI thread. Thus, in this case, this object performs the | 82 // terminate on the UI thread. Thus, in this case, this object performs the |
| 83 // allocation and maintains the set of allocated transport DIBs which the | 83 // allocation and maintains the set of allocated transport DIBs which the |
| 84 // renderers can refer to. | 84 // renderers can refer to. |
| 85 // | 85 // |
| 86 class RenderWidgetHelper : | 86 class RenderWidgetHelper : |
| 87 public base::RefCountedThreadSafe<RenderWidgetHelper> { | 87 public base::RefCountedThreadSafe<RenderWidgetHelper> { |
| 88 public: | 88 public: |
| 89 RenderWidgetHelper(int render_process_id, | 89 RenderWidgetHelper(); |
| 90 ResourceDispatcherHost* resource_dispatcher_host); | |
| 91 ~RenderWidgetHelper(); | 90 ~RenderWidgetHelper(); |
| 92 | 91 |
| 92 void Init(int render_process_id, |
| 93 ResourceDispatcherHost* resource_dispatcher_host); |
| 94 |
| 93 // Gets the next available routing id. This is thread safe. | 95 // Gets the next available routing id. This is thread safe. |
| 94 int GetNextRoutingID(); | 96 int GetNextRoutingID(); |
| 95 | 97 |
| 96 // Sets whether popup blocking is enabled or not. | 98 // Sets whether popup blocking is enabled or not. |
| 97 void set_block_popups(bool block) { block_popups_ = block; } | 99 void set_block_popups(bool block) { block_popups_ = block; } |
| 98 | 100 |
| 99 | 101 |
| 100 // UI THREAD ONLY ----------------------------------------------------------- | 102 // UI THREAD ONLY ----------------------------------------------------------- |
| 101 | 103 |
| 102 // These three functions provide the backend implementation of the | 104 // These three functions provide the backend implementation of the |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 195 | 197 |
| 196 // Whether popup blocking is enabled or not. | 198 // Whether popup blocking is enabled or not. |
| 197 bool block_popups_; | 199 bool block_popups_; |
| 198 | 200 |
| 199 ResourceDispatcherHost* resource_dispatcher_host_; | 201 ResourceDispatcherHost* resource_dispatcher_host_; |
| 200 | 202 |
| 201 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHelper); | 203 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHelper); |
| 202 }; | 204 }; |
| 203 | 205 |
| 204 #endif // CHROME_BROWSER_RENDEDER_HOST_RENDER_WIDGET_HELPER_H_ | 206 #endif // CHROME_BROWSER_RENDEDER_HOST_RENDER_WIDGET_HELPER_H_ |
| OLD | NEW |