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

Side by Side Diff: components/guest_view/browser/guest_view_base.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/browser/guest_view_base.h" 5 #include "components/guest_view/browser/guest_view_base.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/lazy_instance.h" 9 #include "base/lazy_instance.h"
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 21 matching lines...) Expand all
32 32
33 namespace content { 33 namespace content {
34 struct FrameNavigateParams; 34 struct FrameNavigateParams;
35 } 35 }
36 36
37 namespace guest_view { 37 namespace guest_view {
38 38
39 namespace { 39 namespace {
40 40
41 using WebContentsGuestViewMap = std::map<const WebContents*, GuestViewBase*>; 41 using WebContentsGuestViewMap = std::map<const WebContents*, GuestViewBase*>;
42 static base::LazyInstance<WebContentsGuestViewMap> webcontents_guestview_map = 42 static base::LazyInstance<WebContentsGuestViewMap>::DestructorAtExit
43 LAZY_INSTANCE_INITIALIZER; 43 webcontents_guestview_map = LAZY_INSTANCE_INITIALIZER;
44 44
45 } // namespace 45 } // namespace
46 46
47 SetSizeParams::SetSizeParams() { 47 SetSizeParams::SetSizeParams() {
48 } 48 }
49 SetSizeParams::~SetSizeParams() { 49 SetSizeParams::~SetSizeParams() {
50 } 50 }
51 51
52 // This observer ensures that the GuestViewBase destroys itself when its 52 // This observer ensures that the GuestViewBase destroys itself when its
53 // embedder goes away. It also tracks when the embedder's fullscreen is 53 // embedder goes away. It also tracks when the embedder's fullscreen is
(...skipping 872 matching lines...) Expand 10 before | Expand all | Expand 10 after
926 926
927 void GuestViewBase::UpdateGuestSize(const gfx::Size& new_size, 927 void GuestViewBase::UpdateGuestSize(const gfx::Size& new_size,
928 bool due_to_auto_resize) { 928 bool due_to_auto_resize) {
929 if (due_to_auto_resize) 929 if (due_to_auto_resize)
930 GuestSizeChangedDueToAutoSize(guest_size_, new_size); 930 GuestSizeChangedDueToAutoSize(guest_size_, new_size);
931 DispatchOnResizeEvent(guest_size_, new_size); 931 DispatchOnResizeEvent(guest_size_, new_size);
932 guest_size_ = new_size; 932 guest_size_ = new_size;
933 } 933 }
934 934
935 } // namespace guest_view 935 } // namespace guest_view
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698