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> |
11 #include <limits> | 11 #include <limits> |
12 #include <vector> | 12 #include <vector> |
13 | 13 |
14 #if defined(OS_POSIX) | 14 #if defined(OS_POSIX) |
15 #include <utility> // for pair<> | 15 #include <utility> // for pair<> |
16 #endif | 16 #endif |
17 | 17 |
| 18 #include "base/base_switches.h" |
18 #include "base/callback.h" | 19 #include "base/callback.h" |
19 #include "base/command_line.h" | 20 #include "base/command_line.h" |
20 #include "base/logging.h" | 21 #include "base/logging.h" |
21 #include "base/metrics/field_trial.h" | 22 #include "base/metrics/field_trial.h" |
22 #include "base/metrics/histogram.h" | 23 #include "base/metrics/histogram.h" |
23 #include "base/path_service.h" | 24 #include "base/path_service.h" |
24 #include "base/platform_file.h" | 25 #include "base/platform_file.h" |
25 #include "base/stl_util.h" | 26 #include "base/stl_util.h" |
26 #include "base/string_util.h" | 27 #include "base/string_util.h" |
27 #include "base/threading/thread.h" | 28 #include "base/threading/thread.h" |
(...skipping 893 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
921 void BrowserRenderProcessHost::OnRevealFolderInOS(const FilePath& path) { | 922 void BrowserRenderProcessHost::OnRevealFolderInOS(const FilePath& path) { |
922 // Only honor the request if appropriate persmissions are granted. | 923 // Only honor the request if appropriate persmissions are granted. |
923 if (ChildProcessSecurityPolicy::GetInstance()->CanReadFile(id(), path)) | 924 if (ChildProcessSecurityPolicy::GetInstance()->CanReadFile(id(), path)) |
924 content::GetContentClient()->browser()->RevealFolderInOS(path); | 925 content::GetContentClient()->browser()->RevealFolderInOS(path); |
925 } | 926 } |
926 | 927 |
927 void BrowserRenderProcessHost::OnSavedPageAsMHTML(int job_id, bool success) { | 928 void BrowserRenderProcessHost::OnSavedPageAsMHTML(int job_id, bool success) { |
928 content::GetContentClient()->browser()->GetMHTMLGenerationManager()-> | 929 content::GetContentClient()->browser()->GetMHTMLGenerationManager()-> |
929 MHTMLGenerated(job_id, success); | 930 MHTMLGenerated(job_id, success); |
930 } | 931 } |
OLD | NEW |