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

Side by Side Diff: gfx/gtk_native_view_id_manager.cc

Issue 3522004: FBTF: Move ctors/dtors into implementation files. Adds ctors/dtors to non-POD structs. (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: Created 10 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
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 "gfx/gtk_native_view_id_manager.h" 5 #include "gfx/gtk_native_view_id_manager.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/rand_util.h" 8 #include "base/rand_util.h"
9 #include "gfx/rect.h" 9 #include "gfx/rect.h"
10 10
(...skipping 20 matching lines...) Expand all
31 31
32 // ----------------------------------------------------------------------------- 32 // -----------------------------------------------------------------------------
33 33
34 34
35 // ----------------------------------------------------------------------------- 35 // -----------------------------------------------------------------------------
36 // Public functions... 36 // Public functions...
37 37
38 GtkNativeViewManager::GtkNativeViewManager() { 38 GtkNativeViewManager::GtkNativeViewManager() {
39 } 39 }
40 40
41 GtkNativeViewManager::~GtkNativeViewManager() {
42 }
43
41 gfx::NativeViewId GtkNativeViewManager::GetIdForWidget(gfx::NativeView widget) { 44 gfx::NativeViewId GtkNativeViewManager::GetIdForWidget(gfx::NativeView widget) {
42 // This is just for unit tests: 45 // This is just for unit tests:
43 if (!widget) 46 if (!widget)
44 return 0; 47 return 0;
45 48
46 AutoLock locked(lock_); 49 AutoLock locked(lock_);
47 50
48 std::map<gfx::NativeView, gfx::NativeViewId>::const_iterator i = 51 std::map<gfx::NativeView, gfx::NativeViewId>::const_iterator i =
49 native_view_to_id_.find(widget); 52 native_view_to_id_.find(widget);
50 53
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 140
138 std::map<gfx::NativeViewId, NativeViewInfo>::iterator j = 141 std::map<gfx::NativeViewId, NativeViewInfo>::iterator j =
139 id_to_info_.find(i->second); 142 id_to_info_.find(i->second);
140 CHECK(j != id_to_info_.end()); 143 CHECK(j != id_to_info_.end());
141 144
142 native_view_to_id_.erase(i); 145 native_view_to_id_.erase(i);
143 id_to_info_.erase(j); 146 id_to_info_.erase(j);
144 } 147 }
145 148
146 // ----------------------------------------------------------------------------- 149 // -----------------------------------------------------------------------------
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698