| OLD | NEW |
| 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 "base/allocator/allocator_extension.h" | 7 #include "base/allocator/allocator_extension.h" |
| 8 #include "base/bind.h" | 8 #include "base/bind.h" |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/file_util.h" | 10 #include "base/file_util.h" |
| (...skipping 27 matching lines...) Expand all Loading... |
| 38 #include "third_party/sqlite/sqlite3.h" | 38 #include "third_party/sqlite/sqlite3.h" |
| 39 #include "third_party/WebKit/Source/WebKit/chromium/public/WebCache.h" | 39 #include "third_party/WebKit/Source/WebKit/chromium/public/WebCache.h" |
| 40 #include "third_party/WebKit/Source/WebKit/chromium/public/WebCrossOriginPreflig
htResultCache.h" | 40 #include "third_party/WebKit/Source/WebKit/chromium/public/WebCrossOriginPreflig
htResultCache.h" |
| 41 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDocument.h" | 41 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDocument.h" |
| 42 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFontCache.h" | 42 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFontCache.h" |
| 43 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h" | 43 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h" |
| 44 #include "third_party/WebKit/Source/WebKit/chromium/public/WebRuntimeFeatures.h" | 44 #include "third_party/WebKit/Source/WebKit/chromium/public/WebRuntimeFeatures.h" |
| 45 #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" | 45 #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" |
| 46 #include "v8/include/v8.h" | 46 #include "v8/include/v8.h" |
| 47 | 47 |
| 48 #if defined(OS_ANDROID) | |
| 49 #include "webkit/media/android/webmediaplayer_android.h" | |
| 50 #endif | |
| 51 | |
| 52 #if defined(OS_WIN) | 48 #if defined(OS_WIN) |
| 53 #include "base/win/iat_patch_function.h" | 49 #include "base/win/iat_patch_function.h" |
| 54 #endif | 50 #endif |
| 55 | 51 |
| 56 #if defined(USE_TCMALLOC) | 52 #if defined(USE_TCMALLOC) |
| 57 #include "third_party/tcmalloc/chromium/src/gperftools/heap-profiler.h" | 53 #include "third_party/tcmalloc/chromium/src/gperftools/heap-profiler.h" |
| 58 #endif | 54 #endif |
| 59 | 55 |
| 60 using WebKit::WebCache; | 56 using WebKit::WebCache; |
| 61 using WebKit::WebCrossOriginPreflightResultCache; | 57 using WebKit::WebCrossOriginPreflightResultCache; |
| (...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 236 IPC_MESSAGE_HANDLER(ChromeViewMsg_ToggleWebKitSharedTimer, | 232 IPC_MESSAGE_HANDLER(ChromeViewMsg_ToggleWebKitSharedTimer, |
| 237 OnToggleWebKitSharedTimer) | 233 OnToggleWebKitSharedTimer) |
| 238 IPC_MESSAGE_UNHANDLED(handled = false) | 234 IPC_MESSAGE_UNHANDLED(handled = false) |
| 239 IPC_END_MESSAGE_MAP() | 235 IPC_END_MESSAGE_MAP() |
| 240 return handled; | 236 return handled; |
| 241 } | 237 } |
| 242 | 238 |
| 243 void ChromeRenderProcessObserver::OnSetIsIncognitoProcess( | 239 void ChromeRenderProcessObserver::OnSetIsIncognitoProcess( |
| 244 bool is_incognito_process) { | 240 bool is_incognito_process) { |
| 245 is_incognito_process_ = is_incognito_process; | 241 is_incognito_process_ = is_incognito_process; |
| 246 #if defined(OS_ANDROID) | |
| 247 webkit_media::WebMediaPlayerAndroid::InitIncognito(is_incognito_process_); | |
| 248 #endif | |
| 249 } | 242 } |
| 250 | 243 |
| 251 void ChromeRenderProcessObserver::OnSetContentSettingRules( | 244 void ChromeRenderProcessObserver::OnSetContentSettingRules( |
| 252 const RendererContentSettingRules& rules) { | 245 const RendererContentSettingRules& rules) { |
| 253 content_setting_rules_ = rules; | 246 content_setting_rules_ = rules; |
| 254 } | 247 } |
| 255 | 248 |
| 256 void ChromeRenderProcessObserver::OnSetCacheCapacities(size_t min_dead_capacity, | 249 void ChromeRenderProcessObserver::OnSetCacheCapacities(size_t min_dead_capacity, |
| 257 size_t max_dead_capacity, | 250 size_t max_dead_capacity, |
| 258 size_t capacity) { | 251 size_t capacity) { |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 357 if (clear_cache_pending_) { | 350 if (clear_cache_pending_) { |
| 358 clear_cache_pending_ = false; | 351 clear_cache_pending_ = false; |
| 359 WebCache::clear(); | 352 WebCache::clear(); |
| 360 } | 353 } |
| 361 } | 354 } |
| 362 | 355 |
| 363 const RendererContentSettingRules* | 356 const RendererContentSettingRules* |
| 364 ChromeRenderProcessObserver::content_setting_rules() const { | 357 ChromeRenderProcessObserver::content_setting_rules() const { |
| 365 return &content_setting_rules_; | 358 return &content_setting_rules_; |
| 366 } | 359 } |
| OLD | NEW |