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

Side by Side Diff: content/renderer/render_thread_impl.cc

Issue 1368583006: Don't use view contexts in the renderer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 years, 2 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
« no previous file with comments | « content/common/gpu/gpu_messages.h ('k') | content/renderer/render_widget.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "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 1541 matching lines...) Expand 10 before | Expand all | Expand 10 after
1552 return !!current(); 1552 return !!current();
1553 } 1553 }
1554 1554
1555 scoped_refptr<base::SingleThreadTaskRunner> 1555 scoped_refptr<base::SingleThreadTaskRunner>
1556 RenderThreadImpl::GetIOThreadTaskRunner() { 1556 RenderThreadImpl::GetIOThreadTaskRunner() {
1557 return io_thread_task_runner_; 1557 return io_thread_task_runner_;
1558 } 1558 }
1559 1559
1560 scoped_ptr<base::SharedMemory> RenderThreadImpl::AllocateSharedMemory( 1560 scoped_ptr<base::SharedMemory> RenderThreadImpl::AllocateSharedMemory(
1561 size_t size) { 1561 size_t size) {
1562 return scoped_ptr<base::SharedMemory>( 1562 return HostAllocateSharedMemoryBuffer(size);
1563 HostAllocateSharedMemoryBuffer(size));
1564 } 1563 }
1565 1564
1566 CreateCommandBufferResult RenderThreadImpl::CreateViewCommandBuffer( 1565 CreateCommandBufferResult RenderThreadImpl::CreateViewCommandBuffer(
1567 int32 surface_id, 1566 int32 surface_id,
1568 const GPUCreateCommandBufferConfig& init_params, 1567 const GPUCreateCommandBufferConfig& init_params,
1569 int32 route_id) { 1568 int32 route_id) {
1570 TRACE_EVENT1("gpu", 1569 NOTREACHED();
1571 "RenderThreadImpl::CreateViewCommandBuffer", 1570 return CREATE_COMMAND_BUFFER_FAILED;
1572 "surface_id",
1573 surface_id);
1574
1575 CreateCommandBufferResult result = CREATE_COMMAND_BUFFER_FAILED;
1576 IPC::Message* message = new GpuHostMsg_CreateViewCommandBuffer(
1577 init_params,
1578 route_id,
1579 &result);
1580
1581 // Allow calling this from the compositor thread.
1582 thread_safe_sender()->Send(message);
1583
1584 return result;
1585 } 1571 }
1586 1572
1587 void RenderThreadImpl::DoNotNotifyWebKitOfModalLoop() { 1573 void RenderThreadImpl::DoNotNotifyWebKitOfModalLoop() {
1588 notify_webkit_of_modal_loop_ = false; 1574 notify_webkit_of_modal_loop_ = false;
1589 } 1575 }
1590 1576
1591 bool RenderThreadImpl::OnControlMessageReceived(const IPC::Message& msg) { 1577 bool RenderThreadImpl::OnControlMessageReceived(const IPC::Message& msg) {
1592 base::ObserverListBase<RenderProcessObserver>::Iterator it(&observers_); 1578 base::ObserverListBase<RenderProcessObserver>::Iterator it(&observers_);
1593 RenderProcessObserver* observer; 1579 RenderProcessObserver* observer;
1594 while ((observer = it.GetNext()) != NULL) { 1580 while ((observer = it.GetNext()) != NULL) {
(...skipping 414 matching lines...) Expand 10 before | Expand all | Expand 10 after
2009 } 1995 }
2010 1996
2011 void RenderThreadImpl::PendingRenderFrameConnect::OnConnectionError() { 1997 void RenderThreadImpl::PendingRenderFrameConnect::OnConnectionError() {
2012 size_t erased = 1998 size_t erased =
2013 RenderThreadImpl::current()->pending_render_frame_connects_.erase( 1999 RenderThreadImpl::current()->pending_render_frame_connects_.erase(
2014 routing_id_); 2000 routing_id_);
2015 DCHECK_EQ(1u, erased); 2001 DCHECK_EQ(1u, erased);
2016 } 2002 }
2017 2003
2018 } // namespace content 2004 } // namespace content
OLDNEW
« no previous file with comments | « content/common/gpu/gpu_messages.h ('k') | content/renderer/render_widget.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698