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

Side by Side Diff: content/renderer/gpu/render_widget_compositor.cc

Issue 14139013: Hide location bar on Javascript-initiated scroll. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Merge after sync. Created 7 years, 8 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
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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/gpu/render_widget_compositor.h" 5 #include "content/renderer/gpu/render_widget_compositor.h"
6 6
7 #include <limits> 7 #include <limits>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after
331 331
332 void RenderWidgetCompositor::SetOverdrawBottomHeight( 332 void RenderWidgetCompositor::SetOverdrawBottomHeight(
333 float overdraw_bottom_height) { 333 float overdraw_bottom_height) {
334 layer_tree_host_->SetOverdrawBottomHeight(overdraw_bottom_height); 334 layer_tree_host_->SetOverdrawBottomHeight(overdraw_bottom_height);
335 } 335 }
336 336
337 void RenderWidgetCompositor::SetNeedsRedrawRect(gfx::Rect damage_rect) { 337 void RenderWidgetCompositor::SetNeedsRedrawRect(gfx::Rect damage_rect) {
338 layer_tree_host_->SetNeedsRedrawRect(damage_rect); 338 layer_tree_host_->SetNeedsRedrawRect(damage_rect);
339 } 339 }
340 340
341 void RenderWidgetCompositor::ShowTopControls(bool show) {
342 layer_tree_host_->ShowTopControls(show);
343 }
344
341 bool RenderWidgetCompositor::initialize(cc::LayerTreeSettings settings) { 345 bool RenderWidgetCompositor::initialize(cc::LayerTreeSettings settings) {
342 scoped_ptr<cc::Thread> impl_thread; 346 scoped_ptr<cc::Thread> impl_thread;
343 scoped_refptr<base::MessageLoopProxy> compositor_message_loop_proxy = 347 scoped_refptr<base::MessageLoopProxy> compositor_message_loop_proxy =
344 RenderThreadImpl::current()->compositor_message_loop_proxy(); 348 RenderThreadImpl::current()->compositor_message_loop_proxy();
345 threaded_ = !!compositor_message_loop_proxy; 349 threaded_ = !!compositor_message_loop_proxy;
346 if (threaded_) { 350 if (threaded_) {
347 impl_thread = cc::ThreadImpl::CreateForDifferentThread( 351 impl_thread = cc::ThreadImpl::CreateForDifferentThread(
348 compositor_message_loop_proxy); 352 compositor_message_loop_proxy);
349 } 353 }
350 layer_tree_host_ = cc::LayerTreeHost::Create(this, 354 layer_tree_host_ = cc::LayerTreeHost::Create(this,
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
555 return RenderThreadImpl::current()->OffscreenContextProviderForMainThread(); 559 return RenderThreadImpl::current()->OffscreenContextProviderForMainThread();
556 } 560 }
557 561
558 scoped_refptr<cc::ContextProvider> 562 scoped_refptr<cc::ContextProvider>
559 RenderWidgetCompositor::OffscreenContextProviderForCompositorThread() { 563 RenderWidgetCompositor::OffscreenContextProviderForCompositorThread() {
560 return RenderThreadImpl::current()-> 564 return RenderThreadImpl::current()->
561 OffscreenContextProviderForCompositorThread(); 565 OffscreenContextProviderForCompositorThread();
562 } 566 }
563 567
564 } // namespace content 568 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698