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

Side by Side Diff: chrome/renderer/chrome_render_process_observer.cc

Issue 1566603003: Dummy patch to try out Mojo connection (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Initialize from RegisterRenderProcessMojoServices Created 4 years, 11 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
« no previous file with comments | « chrome/renderer/DEPS ('k') | chrome/renderer/leak_detector/leak_detector_monitor_client.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "chrome/renderer/chrome_render_process_observer.h" 5 #include "chrome/renderer/chrome_render_process_observer.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <limits> 8 #include <limits>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 52
53 #if defined(ENABLE_EXTENSIONS) 53 #if defined(ENABLE_EXTENSIONS)
54 #include "chrome/renderer/extensions/extension_localization_peer.h" 54 #include "chrome/renderer/extensions/extension_localization_peer.h"
55 #endif 55 #endif
56 56
57 #if !defined(OS_IOS) 57 #if !defined(OS_IOS)
58 #include "chrome/common/media/media_resource_provider.h" 58 #include "chrome/common/media/media_resource_provider.h"
59 #include "media/base/media_resources.h" 59 #include "media/base/media_resources.h"
60 #endif 60 #endif
61 61
62 #include "chrome/renderer/leak_detector/leak_detector_monitor_client.h"
63
62 using blink::WebCache; 64 using blink::WebCache;
63 using blink::WebRuntimeFeatures; 65 using blink::WebRuntimeFeatures;
64 using blink::WebSecurityPolicy; 66 using blink::WebSecurityPolicy;
65 using blink::WebString; 67 using blink::WebString;
66 using content::RenderThread; 68 using content::RenderThread;
67 69
68 namespace { 70 namespace {
69 71
70 const int kCacheStatsDelayMS = 2000; 72 const int kCacheStatsDelayMS = 2000;
71 73
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
261 net::NetModule::SetResourceProvider(chrome_common_net::NetResourceProvider); 263 net::NetModule::SetResourceProvider(chrome_common_net::NetResourceProvider);
262 #if !defined(OS_IOS) 264 #if !defined(OS_IOS)
263 media::SetLocalizedStringProvider( 265 media::SetLocalizedStringProvider(
264 chrome_common_media::LocalizedStringProvider); 266 chrome_common_media::LocalizedStringProvider);
265 #endif 267 #endif
266 268
267 // Setup initial set of crash dump data for Field Trials in this renderer. 269 // Setup initial set of crash dump data for Field Trials in this renderer.
268 variations::SetVariationListCrashKeys(); 270 variations::SetVariationListCrashKeys();
269 // Listen for field trial activations to report them to the browser. 271 // Listen for field trial activations to report them to the browser.
270 base::FieldTrialList::AddObserver(this); 272 base::FieldTrialList::AddObserver(this);
273
274 LOG(INFO) << "Initialize LeakDetectorMonitorClient";
275 metrics::LeakDetectorMonitorClient::Initialize();
271 } 276 }
272 277
273 ChromeRenderProcessObserver::~ChromeRenderProcessObserver() { 278 ChromeRenderProcessObserver::~ChromeRenderProcessObserver() {
279 metrics::LeakDetectorMonitorClient::Shutdown();
274 } 280 }
275 281
276 bool ChromeRenderProcessObserver::OnControlMessageReceived( 282 bool ChromeRenderProcessObserver::OnControlMessageReceived(
277 const IPC::Message& message) { 283 const IPC::Message& message) {
278 bool handled = true; 284 bool handled = true;
279 IPC_BEGIN_MESSAGE_MAP(ChromeRenderProcessObserver, message) 285 IPC_BEGIN_MESSAGE_MAP(ChromeRenderProcessObserver, message)
280 IPC_MESSAGE_HANDLER(ChromeViewMsg_SetIsIncognitoProcess, 286 IPC_MESSAGE_HANDLER(ChromeViewMsg_SetIsIncognitoProcess,
281 OnSetIsIncognitoProcess) 287 OnSetIsIncognitoProcess)
282 IPC_MESSAGE_HANDLER(ChromeViewMsg_SetFieldTrialGroup, OnSetFieldTrialGroup) 288 IPC_MESSAGE_HANDLER(ChromeViewMsg_SetFieldTrialGroup, OnSetFieldTrialGroup)
283 IPC_MESSAGE_HANDLER(ChromeViewMsg_SetContentSettingRules, 289 IPC_MESSAGE_HANDLER(ChromeViewMsg_SetContentSettingRules,
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
335 ChromeRenderProcessObserver::content_setting_rules() const { 341 ChromeRenderProcessObserver::content_setting_rules() const {
336 return &content_setting_rules_; 342 return &content_setting_rules_;
337 } 343 }
338 344
339 void ChromeRenderProcessObserver::OnFieldTrialGroupFinalized( 345 void ChromeRenderProcessObserver::OnFieldTrialGroupFinalized(
340 const std::string& trial_name, 346 const std::string& trial_name,
341 const std::string& group_name) { 347 const std::string& group_name) {
342 content::RenderThread::Get()->Send( 348 content::RenderThread::Get()->Send(
343 new ChromeViewHostMsg_FieldTrialActivated(trial_name)); 349 new ChromeViewHostMsg_FieldTrialActivated(trial_name));
344 } 350 }
OLDNEW
« no previous file with comments | « chrome/renderer/DEPS ('k') | chrome/renderer/leak_detector/leak_detector_monitor_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698