OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/render_thread.h" | 5 #include "chrome/renderer/render_thread.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <limits> | 8 #include <limits> |
9 #include <map> | 9 #include <map> |
10 #include <vector> | 10 #include <vector> |
(...skipping 476 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
487 ScheduleIdleHandler(kInitialIdleHandlerDelayS); | 487 ScheduleIdleHandler(kInitialIdleHandlerDelayS); |
488 } | 488 } |
489 | 489 |
490 void RenderThread::WidgetRestored() { | 490 void RenderThread::WidgetRestored() { |
491 DCHECK_GT(hidden_widget_count_, 0); | 491 DCHECK_GT(hidden_widget_count_, 0); |
492 hidden_widget_count_--; | 492 hidden_widget_count_--; |
493 if (!is_extension_process_) | 493 if (!is_extension_process_) |
494 idle_timer_.Stop(); | 494 idle_timer_.Stop(); |
495 } | 495 } |
496 | 496 |
| 497 bool RenderThread::IsExtensionProcess() const { |
| 498 return is_extension_process_; |
| 499 } |
| 500 |
| 501 bool RenderThread::IsIncognitoProcess() const { |
| 502 return is_incognito_process_; |
| 503 } |
| 504 |
497 void RenderThread::DoNotSuspendWebKitSharedTimer() { | 505 void RenderThread::DoNotSuspendWebKitSharedTimer() { |
498 suspend_webkit_shared_timer_ = false; | 506 suspend_webkit_shared_timer_ = false; |
499 } | 507 } |
500 | 508 |
501 void RenderThread::DoNotNotifyWebKitOfModalLoop() { | 509 void RenderThread::DoNotNotifyWebKitOfModalLoop() { |
502 notify_webkit_of_modal_loop_ = false; | 510 notify_webkit_of_modal_loop_ = false; |
503 } | 511 } |
504 | 512 |
505 void RenderThread::Resolve(const char* name, size_t length) { | 513 void RenderThread::Resolve(const char* name, size_t length) { |
506 return renderer_net_predictor_->Resolve(name, length); | 514 return renderer_net_predictor_->Resolve(name, length); |
(...skipping 632 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1139 } | 1147 } |
1140 | 1148 |
1141 return false; | 1149 return false; |
1142 } | 1150 } |
1143 | 1151 |
1144 void RenderThread::RegisterExtension(v8::Extension* extension, | 1152 void RenderThread::RegisterExtension(v8::Extension* extension, |
1145 bool restrict_to_extensions) { | 1153 bool restrict_to_extensions) { |
1146 WebScriptController::registerExtension(extension); | 1154 WebScriptController::registerExtension(extension); |
1147 v8_extensions_[extension->name()] = restrict_to_extensions; | 1155 v8_extensions_[extension->name()] = restrict_to_extensions; |
1148 } | 1156 } |
OLD | NEW |