Commit bd304c25 authored by reveman's avatar reveman Committed by Commit bot

content: Remove the use of linked_ptr from content_test_suite.cc.

BUG=323304

Review URL: https://codereview.chromium.org/1140523005

Cr-Commit-Position: refs/heads/master@{#330421}
parent b74e4a77
...@@ -7,7 +7,6 @@ ...@@ -7,7 +7,6 @@
#if defined(OS_ANDROID) #if defined(OS_ANDROID)
#include <android/native_window.h> #include <android/native_window.h>
#include <android/native_window_jni.h> #include <android/native_window_jni.h>
#include <map>
#endif #endif
#include "base/base_paths.h" #include "base/base_paths.h"
...@@ -38,7 +37,8 @@ ...@@ -38,7 +37,8 @@
#if defined(OS_ANDROID) #if defined(OS_ANDROID)
#include "base/android/jni_android.h" #include "base/android/jni_android.h"
#include "base/memory/linked_ptr.h" #include "base/containers/scoped_ptr_hash_map.h"
#include "base/memory/scoped_ptr.h"
#include "content/common/android/surface_texture_manager.h" #include "content/common/android/surface_texture_manager.h"
#include "ui/gl/android/scoped_java_surface.h" #include "ui/gl/android/scoped_java_surface.h"
#include "ui/gl/android/surface_texture.h" #include "ui/gl/android/surface_texture.h"
...@@ -74,8 +74,8 @@ class TestSurfaceTextureManager : public SurfaceTextureManager { ...@@ -74,8 +74,8 @@ class TestSurfaceTextureManager : public SurfaceTextureManager {
void RegisterSurfaceTexture(int surface_texture_id, void RegisterSurfaceTexture(int surface_texture_id,
int client_id, int client_id,
gfx::SurfaceTexture* surface_texture) override { gfx::SurfaceTexture* surface_texture) override {
surfaces_[surface_texture_id] = surfaces_.add(surface_texture_id,
make_linked_ptr(new gfx::ScopedJavaSurface(surface_texture)); make_scoped_ptr(new gfx::ScopedJavaSurface(surface_texture)));
} }
void UnregisterSurfaceTexture(int surface_texture_id, void UnregisterSurfaceTexture(int surface_texture_id,
int client_id) override { int client_id) override {
...@@ -85,11 +85,12 @@ class TestSurfaceTextureManager : public SurfaceTextureManager { ...@@ -85,11 +85,12 @@ class TestSurfaceTextureManager : public SurfaceTextureManager {
int surface_texture_id) override { int surface_texture_id) override {
JNIEnv* env = base::android::AttachCurrentThread(); JNIEnv* env = base::android::AttachCurrentThread();
return ANativeWindow_fromSurface( return ANativeWindow_fromSurface(
env, surfaces_[surface_texture_id]->j_surface().obj()); env, surfaces_.get(surface_texture_id)->j_surface().obj());
} }
private: private:
typedef std::map<int, linked_ptr<gfx::ScopedJavaSurface>> SurfaceMap; using SurfaceMap =
base::ScopedPtrHashMap<int, scoped_ptr<gfx::ScopedJavaSurface>>;
SurfaceMap surfaces_; SurfaceMap surfaces_;
}; };
#endif #endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment