OLD | NEW |
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 // Represents the browser side of the browser <--> renderer communication | 5 // Represents the browser side of the browser <--> renderer communication |
6 // channel. There will be one RenderProcessHost per renderer process. | 6 // channel. There will be one RenderProcessHost per renderer process. |
7 | 7 |
8 #include "content/browser/renderer_host/browser_render_process_host.h" | 8 #include "content/browser/renderer_host/browser_render_process_host.h" |
9 | 9 |
10 #include <algorithm> | 10 #include <algorithm> |
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
178 }; | 178 }; |
179 | 179 |
180 } // namespace | 180 } // namespace |
181 | 181 |
182 BrowserRenderProcessHost::BrowserRenderProcessHost( | 182 BrowserRenderProcessHost::BrowserRenderProcessHost( |
183 content::BrowserContext* browser_context) | 183 content::BrowserContext* browser_context) |
184 : RenderProcessHost(browser_context), | 184 : RenderProcessHost(browser_context), |
185 visible_widgets_(0), | 185 visible_widgets_(0), |
186 backgrounded_(true), | 186 backgrounded_(true), |
187 ALLOW_THIS_IN_INITIALIZER_LIST(cached_dibs_cleaner_( | 187 ALLOW_THIS_IN_INITIALIZER_LIST(cached_dibs_cleaner_( |
188 FROM_HERE, base::TimeDelta::FromSeconds(5), | 188 base::TimeDelta::FromSeconds(5), |
189 this, &BrowserRenderProcessHost::ClearTransportDIBCache)), | 189 this, &BrowserRenderProcessHost::ClearTransportDIBCache)), |
190 accessibility_enabled_(false), | 190 accessibility_enabled_(false), |
191 is_initialized_(false) { | 191 is_initialized_(false) { |
192 widget_helper_ = new RenderWidgetHelper(); | 192 widget_helper_ = new RenderWidgetHelper(); |
193 | 193 |
194 ChildProcessSecurityPolicy::GetInstance()->Add(id()); | 194 ChildProcessSecurityPolicy::GetInstance()->Add(id()); |
195 | 195 |
196 // Grant most file permissions to this renderer. | 196 // Grant most file permissions to this renderer. |
197 // PLATFORM_FILE_TEMPORARY, PLATFORM_FILE_HIDDEN and | 197 // PLATFORM_FILE_TEMPORARY, PLATFORM_FILE_HIDDEN and |
198 // PLATFORM_FILE_DELETE_ON_CLOSE are not granted, because no existing API | 198 // PLATFORM_FILE_DELETE_ON_CLOSE are not granted, because no existing API |
(...skipping 732 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
931 void BrowserRenderProcessHost::OnRevealFolderInOS(const FilePath& path) { | 931 void BrowserRenderProcessHost::OnRevealFolderInOS(const FilePath& path) { |
932 // Only honor the request if appropriate persmissions are granted. | 932 // Only honor the request if appropriate persmissions are granted. |
933 if (ChildProcessSecurityPolicy::GetInstance()->CanReadFile(id(), path)) | 933 if (ChildProcessSecurityPolicy::GetInstance()->CanReadFile(id(), path)) |
934 content::GetContentClient()->browser()->OpenItem(path); | 934 content::GetContentClient()->browser()->OpenItem(path); |
935 } | 935 } |
936 | 936 |
937 void BrowserRenderProcessHost::OnSavedPageAsMHTML(int job_id, bool success) { | 937 void BrowserRenderProcessHost::OnSavedPageAsMHTML(int job_id, bool success) { |
938 content::GetContentClient()->browser()->GetMHTMLGenerationManager()-> | 938 content::GetContentClient()->browser()->GetMHTMLGenerationManager()-> |
939 MHTMLGenerated(job_id, success); | 939 MHTMLGenerated(job_id, success); |
940 } | 940 } |
OLD | NEW |