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

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: 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 313 matching lines...) Expand 10 before | Expand all | Expand 10 after
324 layer_tree_host_->UpdateTopControlsState(enable_hiding, 324 layer_tree_host_->UpdateTopControlsState(enable_hiding,
325 enable_showing, 325 enable_showing,
326 animate); 326 animate);
327 } 327 }
328 328
329 void RenderWidgetCompositor::SetOverdrawBottomHeight( 329 void RenderWidgetCompositor::SetOverdrawBottomHeight(
330 float overdraw_bottom_height) { 330 float overdraw_bottom_height) {
331 layer_tree_host_->SetOverdrawBottomHeight(overdraw_bottom_height); 331 layer_tree_host_->SetOverdrawBottomHeight(overdraw_bottom_height);
332 } 332 }
333 333
334 void RenderWidgetCompositor::ShowTopControls(bool show) {
335 layer_tree_host_->ShowTopControls(show);
336 }
337
334 bool RenderWidgetCompositor::initialize(cc::LayerTreeSettings settings) { 338 bool RenderWidgetCompositor::initialize(cc::LayerTreeSettings settings) {
335 scoped_ptr<cc::Thread> impl_thread; 339 scoped_ptr<cc::Thread> impl_thread;
336 scoped_refptr<base::MessageLoopProxy> compositor_message_loop_proxy = 340 scoped_refptr<base::MessageLoopProxy> compositor_message_loop_proxy =
337 RenderThreadImpl::current()->compositor_message_loop_proxy(); 341 RenderThreadImpl::current()->compositor_message_loop_proxy();
338 threaded_ = !!compositor_message_loop_proxy; 342 threaded_ = !!compositor_message_loop_proxy;
339 if (threaded_) { 343 if (threaded_) {
340 impl_thread = cc::ThreadImpl::CreateForDifferentThread( 344 impl_thread = cc::ThreadImpl::CreateForDifferentThread(
341 compositor_message_loop_proxy); 345 compositor_message_loop_proxy);
342 } 346 }
343 layer_tree_host_ = cc::LayerTreeHost::Create(this, 347 layer_tree_host_ = cc::LayerTreeHost::Create(this,
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
548 return RenderThreadImpl::current()->OffscreenContextProviderForMainThread(); 552 return RenderThreadImpl::current()->OffscreenContextProviderForMainThread();
549 } 553 }
550 554
551 scoped_refptr<cc::ContextProvider> 555 scoped_refptr<cc::ContextProvider>
552 RenderWidgetCompositor::OffscreenContextProviderForCompositorThread() { 556 RenderWidgetCompositor::OffscreenContextProviderForCompositorThread() {
553 return RenderThreadImpl::current()-> 557 return RenderThreadImpl::current()->
554 OffscreenContextProviderForCompositorThread(); 558 OffscreenContextProviderForCompositorThread();
555 } 559 }
556 560
557 } // namespace content 561 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698