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 419 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
430 return widget_helper_->WaitForUpdateMsg(render_widget_id, max_delay, msg); | 430 return widget_helper_->WaitForUpdateMsg(render_widget_id, max_delay, msg); |
431 } | 431 } |
432 | 432 |
433 void BrowserRenderProcessHost::ReceivedBadMessage() { | 433 void BrowserRenderProcessHost::ReceivedBadMessage() { |
434 if (run_renderer_in_process()) { | 434 if (run_renderer_in_process()) { |
435 // In single process mode it is better if we don't suicide but just | 435 // In single process mode it is better if we don't suicide but just |
436 // crash. | 436 // crash. |
437 CHECK(false); | 437 CHECK(false); |
438 } | 438 } |
439 NOTREACHED(); | 439 NOTREACHED(); |
440 base::KillProcess(GetHandle(), ResultCodes::KILLED_BAD_MESSAGE, false); | 440 base::KillProcess(GetHandle(), content::RESULT_CODE_KILLED_BAD_MESSAGE, |
| 441 false); |
441 } | 442 } |
442 | 443 |
443 void BrowserRenderProcessHost::WidgetRestored() { | 444 void BrowserRenderProcessHost::WidgetRestored() { |
444 // Verify we were properly backgrounded. | 445 // Verify we were properly backgrounded. |
445 DCHECK_EQ(backgrounded_, (visible_widgets_ == 0)); | 446 DCHECK_EQ(backgrounded_, (visible_widgets_ == 0)); |
446 visible_widgets_++; | 447 visible_widgets_++; |
447 SetBackgrounded(false); | 448 SetBackgrounded(false); |
448 } | 449 } |
449 | 450 |
450 void BrowserRenderProcessHost::WidgetHidden() { | 451 void BrowserRenderProcessHost::WidgetHidden() { |
(...skipping 457 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
908 void BrowserRenderProcessHost::OnUserMetricsRecordAction( | 909 void BrowserRenderProcessHost::OnUserMetricsRecordAction( |
909 const std::string& action) { | 910 const std::string& action) { |
910 UserMetrics::RecordComputedAction(action); | 911 UserMetrics::RecordComputedAction(action); |
911 } | 912 } |
912 | 913 |
913 void BrowserRenderProcessHost::OnRevealFolderInOS(const FilePath& path) { | 914 void BrowserRenderProcessHost::OnRevealFolderInOS(const FilePath& path) { |
914 // Only honor the request if appropriate persmissions are granted. | 915 // Only honor the request if appropriate persmissions are granted. |
915 if (ChildProcessSecurityPolicy::GetInstance()->CanReadFile(id(), path)) | 916 if (ChildProcessSecurityPolicy::GetInstance()->CanReadFile(id(), path)) |
916 content::GetContentClient()->browser()->RevealFolderInOS(path); | 917 content::GetContentClient()->browser()->RevealFolderInOS(path); |
917 } | 918 } |
OLD | NEW |