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

Side by Side Diff: components/guest_view/renderer/guest_view_container.cc

Issue 2733283002: Require explicit selection of traits for LazyInstance (Closed)
Patch Set: Created 3 years, 9 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 "components/guest_view/renderer/guest_view_container.h" 5 #include "components/guest_view/renderer/guest_view_container.h"
6 6
7 #include "base/lazy_instance.h" 7 #include "base/lazy_instance.h"
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/threading/thread_task_runner_handle.h" 9 #include "base/threading/thread_task_runner_handle.h"
10 #include "components/guest_view/common/guest_view_constants.h" 10 #include "components/guest_view/common/guest_view_constants.h"
11 #include "components/guest_view/common/guest_view_messages.h" 11 #include "components/guest_view/common/guest_view_messages.h"
12 #include "components/guest_view/renderer/guest_view_request.h" 12 #include "components/guest_view/renderer/guest_view_request.h"
13 #include "content/public/renderer/render_frame.h" 13 #include "content/public/renderer/render_frame.h"
14 #include "content/public/renderer/render_frame_observer.h" 14 #include "content/public/renderer/render_frame_observer.h"
15 #include "content/public/renderer/render_view.h" 15 #include "content/public/renderer/render_view.h"
16 #include "ui/gfx/geometry/size.h" 16 #include "ui/gfx/geometry/size.h"
17 17
18 namespace { 18 namespace {
19 19
20 using GuestViewContainerMap = std::map<int, guest_view::GuestViewContainer*>; 20 using GuestViewContainerMap = std::map<int, guest_view::GuestViewContainer*>;
21 static base::LazyInstance<GuestViewContainerMap> g_guest_view_container_map = 21 static base::LazyInstance<GuestViewContainerMap>::DestructorAtExit
22 LAZY_INSTANCE_INITIALIZER; 22 g_guest_view_container_map = LAZY_INSTANCE_INITIALIZER;
23 23
24 } // namespace 24 } // namespace
25 25
26 namespace guest_view { 26 namespace guest_view {
27 27
28 class GuestViewContainer::RenderFrameLifetimeObserver 28 class GuestViewContainer::RenderFrameLifetimeObserver
29 : public content::RenderFrameObserver { 29 : public content::RenderFrameObserver {
30 public: 30 public:
31 RenderFrameLifetimeObserver(GuestViewContainer* container, 31 RenderFrameLifetimeObserver(GuestViewContainer* container,
32 content::RenderFrame* render_frame); 32 content::RenderFrame* render_frame);
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after
264 element_resize_isolate_, v8::MicrotasksScope::kDoNotRunMicrotasks); 264 element_resize_isolate_, v8::MicrotasksScope::kDoNotRunMicrotasks);
265 265
266 callback->Call(context->Global(), argc, argv); 266 callback->Call(context->Global(), argc, argv);
267 } 267 }
268 268
269 base::WeakPtr<content::BrowserPluginDelegate> GuestViewContainer::GetWeakPtr() { 269 base::WeakPtr<content::BrowserPluginDelegate> GuestViewContainer::GetWeakPtr() {
270 return weak_ptr_factory_.GetWeakPtr(); 270 return weak_ptr_factory_.GetWeakPtr();
271 } 271 }
272 272
273 } // namespace guest_view 273 } // namespace guest_view
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698