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 #include "content/renderer/render_thread_impl.h" | 5 #include "content/renderer/render_thread_impl.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 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 | 101 |
102 namespace { | 102 namespace { |
103 static const int64 kInitialIdleHandlerDelayMs = 1000; | 103 static const int64 kInitialIdleHandlerDelayMs = 1000; |
104 | 104 |
105 #if defined(TOUCH_UI) | 105 #if defined(TOUCH_UI) |
106 static const int kPopupListBoxMinimumRowHeight = 60; | 106 static const int kPopupListBoxMinimumRowHeight = 60; |
107 #endif | 107 #endif |
108 | 108 |
109 // Keep the global RenderThreadImpl in a TLS slot so it is impossible to access | 109 // Keep the global RenderThreadImpl in a TLS slot so it is impossible to access |
110 // incorrectly from the wrong thread. | 110 // incorrectly from the wrong thread. |
111 static base::LazyInstance<base::ThreadLocalPointer<RenderThreadImpl> > lazy_tls( | 111 static base::LazyInstance<base::ThreadLocalPointer<RenderThreadImpl> > |
112 base::LINKER_INITIALIZED); | 112 lazy_tls = LAZY_INSTANCE_INITIALIZER; |
113 | 113 |
114 class RenderViewZoomer : public content::RenderViewVisitor { | 114 class RenderViewZoomer : public content::RenderViewVisitor { |
115 public: | 115 public: |
116 RenderViewZoomer(const GURL& url, double zoom_level) | 116 RenderViewZoomer(const GURL& url, double zoom_level) |
117 : zoom_level_(zoom_level) { | 117 : zoom_level_(zoom_level) { |
118 host_ = net::GetHostOrSpecFromURL(url); | 118 host_ = net::GetHostOrSpecFromURL(url); |
119 } | 119 } |
120 | 120 |
121 virtual bool Visit(content::RenderView* render_view) { | 121 virtual bool Visit(content::RenderView* render_view) { |
122 WebView* webview = render_view->GetWebView(); | 122 WebView* webview = render_view->GetWebView(); |
(...skipping 662 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
785 | 785 |
786 scoped_refptr<base::MessageLoopProxy> | 786 scoped_refptr<base::MessageLoopProxy> |
787 RenderThreadImpl::GetFileThreadMessageLoopProxy() { | 787 RenderThreadImpl::GetFileThreadMessageLoopProxy() { |
788 DCHECK(message_loop() == MessageLoop::current()); | 788 DCHECK(message_loop() == MessageLoop::current()); |
789 if (!file_thread_.get()) { | 789 if (!file_thread_.get()) { |
790 file_thread_.reset(new base::Thread("Renderer::FILE")); | 790 file_thread_.reset(new base::Thread("Renderer::FILE")); |
791 file_thread_->Start(); | 791 file_thread_->Start(); |
792 } | 792 } |
793 return file_thread_->message_loop_proxy(); | 793 return file_thread_->message_loop_proxy(); |
794 } | 794 } |
OLD | NEW |