| 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 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 237 // We may have some unsent messages at this point, but that's OK. | 237 // We may have some unsent messages at this point, but that's OK. |
| 238 channel_.reset(); | 238 channel_.reset(); |
| 239 while (!queued_messages_.empty()) { | 239 while (!queued_messages_.empty()) { |
| 240 delete queued_messages_.front(); | 240 delete queued_messages_.front(); |
| 241 queued_messages_.pop(); | 241 queued_messages_.pop(); |
| 242 } | 242 } |
| 243 | 243 |
| 244 ClearTransportDIBCache(); | 244 ClearTransportDIBCache(); |
| 245 } | 245 } |
| 246 | 246 |
| 247 void BrowserRenderProcessHost::EnableSendQueue() { |
| 248 is_initialized_ = false; |
| 249 } |
| 250 |
| 247 bool BrowserRenderProcessHost::Init(bool is_accessibility_enabled) { | 251 bool BrowserRenderProcessHost::Init(bool is_accessibility_enabled) { |
| 248 // calling Init() more than once does nothing, this makes it more convenient | 252 // calling Init() more than once does nothing, this makes it more convenient |
| 249 // for the view host which may not be sure in some cases | 253 // for the view host which may not be sure in some cases |
| 250 if (channel_.get()) | 254 if (channel_.get()) |
| 251 return true; | 255 return true; |
| 252 | 256 |
| 253 accessibility_enabled_ = is_accessibility_enabled; | 257 accessibility_enabled_ = is_accessibility_enabled; |
| 254 | 258 |
| 255 CommandLine::StringType renderer_prefix; | 259 CommandLine::StringType renderer_prefix; |
| 256 #if defined(OS_POSIX) | 260 #if defined(OS_POSIX) |
| (...skipping 655 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 912 void BrowserRenderProcessHost::OnUserMetricsRecordAction( | 916 void BrowserRenderProcessHost::OnUserMetricsRecordAction( |
| 913 const std::string& action) { | 917 const std::string& action) { |
| 914 UserMetrics::RecordComputedAction(action); | 918 UserMetrics::RecordComputedAction(action); |
| 915 } | 919 } |
| 916 | 920 |
| 917 void BrowserRenderProcessHost::OnRevealFolderInOS(const FilePath& path) { | 921 void BrowserRenderProcessHost::OnRevealFolderInOS(const FilePath& path) { |
| 918 // Only honor the request if appropriate persmissions are granted. | 922 // Only honor the request if appropriate persmissions are granted. |
| 919 if (ChildProcessSecurityPolicy::GetInstance()->CanReadFile(id(), path)) | 923 if (ChildProcessSecurityPolicy::GetInstance()->CanReadFile(id(), path)) |
| 920 content::GetContentClient()->browser()->RevealFolderInOS(path); | 924 content::GetContentClient()->browser()->RevealFolderInOS(path); |
| 921 } | 925 } |
| OLD | NEW |