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

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

Issue 6927014: Avoid exiting the renderer process if it has a pending render view. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix pre-render issue. Created 9 years, 7 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) 2009 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 #include "content/browser/renderer_host/mock_render_process_host.h" 5 #include "content/browser/renderer_host/mock_render_process_host.h"
6 6
7 #include "content/browser/child_process_security_policy.h" 7 #include "content/browser/child_process_security_policy.h"
8 8
9 MockRenderProcessHost::MockRenderProcessHost(Profile* profile) 9 MockRenderProcessHost::MockRenderProcessHost(Profile* profile)
10 : RenderProcessHost(profile), 10 : RenderProcessHost(profile),
11 transport_dib_(NULL), 11 transport_dib_(NULL),
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 void MockRenderProcessHost::WidgetRestored() { 53 void MockRenderProcessHost::WidgetRestored() {
54 } 54 }
55 55
56 void MockRenderProcessHost::WidgetHidden() { 56 void MockRenderProcessHost::WidgetHidden() {
57 } 57 }
58 58
59 int MockRenderProcessHost::VisibleWidgetCount() const { 59 int MockRenderProcessHost::VisibleWidgetCount() const {
60 return 1; 60 return 1;
61 } 61 }
62 62
63 void MockRenderProcessHost::AddPendingView() {
64 }
65
66 void MockRenderProcessHost::RemovePendingView() {
67 }
68
69 int MockRenderProcessHost::PendingViewCount() const {
70 return 0;
71 }
72
63 void MockRenderProcessHost::AddWord(const string16& word) { 73 void MockRenderProcessHost::AddWord(const string16& word) {
64 } 74 }
65 75
66 76
67 bool MockRenderProcessHost::FastShutdownIfPossible() { 77 bool MockRenderProcessHost::FastShutdownIfPossible() {
68 // We aren't actually going to do anything, but set |fast_shutdown_started_| 78 // We aren't actually going to do anything, but set |fast_shutdown_started_|
69 // to true so that tests know we've been called. 79 // to true so that tests know we've been called.
70 fast_shutdown_started_ = true; 80 fast_shutdown_started_ = true;
71 return true; 81 return true;
72 } 82 }
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 148
139 void MockRenderProcessHostFactory::Remove(MockRenderProcessHost* host) const { 149 void MockRenderProcessHostFactory::Remove(MockRenderProcessHost* host) const {
140 for (ScopedVector<MockRenderProcessHost>::iterator it = processes_.begin(); 150 for (ScopedVector<MockRenderProcessHost>::iterator it = processes_.begin();
141 it != processes_.end(); ++it) { 151 it != processes_.end(); ++it) {
142 if (*it == host) { 152 if (*it == host) {
143 processes_.weak_erase(it); 153 processes_.weak_erase(it);
144 break; 154 break;
145 } 155 }
146 } 156 }
147 } 157 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698