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

Side by Side Diff: content/browser/compositor/image_transport_factory_browsertest.cc

Issue 500953005: Remove implicit conversions from scoped_refptr to T* in content/browser/compositor (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Manual corretions Created 6 years, 4 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/browser/compositor/image_transport_factory.h" 5 #include "content/browser/compositor/image_transport_factory.h"
6 6
7 #include "base/run_loop.h" 7 #include "base/run_loop.h"
8 #include "cc/output/context_provider.h" 8 #include "cc/output/context_provider.h"
9 #include "content/browser/compositor/owned_mailbox.h" 9 #include "content/browser/compositor/owned_mailbox.h"
10 #include "content/public/browser/gpu_data_manager.h" 10 #include "content/public/browser/gpu_data_manager.h"
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 EXPECT_TRUE(mailbox->mailbox().IsZero()); 66 EXPECT_TRUE(mailbox->mailbox().IsZero());
67 67
68 factory->RemoveObserver(&observer); 68 factory->RemoveObserver(&observer);
69 } 69 }
70 70
71 class ImageTransportFactoryTearDownBrowserTest : public ContentBrowserTest { 71 class ImageTransportFactoryTearDownBrowserTest : public ContentBrowserTest {
72 public: 72 public:
73 ImageTransportFactoryTearDownBrowserTest() {} 73 ImageTransportFactoryTearDownBrowserTest() {}
74 74
75 virtual void TearDown() { 75 virtual void TearDown() {
76 if (mailbox_) 76 if (mailbox_.get())
77 EXPECT_TRUE(mailbox_->mailbox().IsZero()); 77 EXPECT_TRUE(mailbox_->mailbox().IsZero());
78 ContentBrowserTest::TearDown(); 78 ContentBrowserTest::TearDown();
79 } 79 }
80 80
81 protected: 81 protected:
82 scoped_refptr<OwnedMailbox> mailbox_; 82 scoped_refptr<OwnedMailbox> mailbox_;
83 }; 83 };
84 84
85 // This crashes on Mac. ImageTransportFactory is NULL unless 85 // This crashes on Mac. ImageTransportFactory is NULL unless
86 // --enable-delegated-renderer is passed, and after that, we'd need to spawn a 86 // --enable-delegated-renderer is passed, and after that, we'd need to spawn a
(...skipping 14 matching lines...) Expand all
101 return; 101 return;
102 ImageTransportFactory* factory = ImageTransportFactory::GetInstance(); 102 ImageTransportFactory* factory = ImageTransportFactory::GetInstance();
103 GLHelper* helper = factory->GetGLHelper(); 103 GLHelper* helper = factory->GetGLHelper();
104 ASSERT_TRUE(helper); 104 ASSERT_TRUE(helper);
105 mailbox_ = new OwnedMailbox(helper); 105 mailbox_ = new OwnedMailbox(helper);
106 EXPECT_FALSE(mailbox_->mailbox().IsZero()); 106 EXPECT_FALSE(mailbox_->mailbox().IsZero());
107 } 107 }
108 108
109 } // anonymous namespace 109 } // anonymous namespace
110 } // namespace content 110 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/compositor/gpu_process_transport_factory.cc ('k') | content/browser/compositor/onscreen_display_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698