Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(126)

Side by Side Diff: content/browser/renderer_host/browser_render_process_host.cc

Issue 7377010: This change will split the result codes between content and chrome. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: actually rename the files Created 9 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698