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

Side by Side Diff: ui/base/gtk/gtk_signal_registrar.cc

Issue 6257006: Move a bunch of random other files to src/ui/base... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 11 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 | Annotate | Revision Log
« no previous file with comments | « ui/base/gtk/gtk_signal_registrar.h ('k') | ui/base/gtk/scoped_handle_gtk.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "app/gtk_signal_registrar.h" 5 #include "ui/base/gtk/gtk_signal_registrar.h"
6 6
7 #include <glib-object.h> 7 #include <glib-object.h>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 10
11 namespace ui {
12
11 GtkSignalRegistrar::GtkSignalRegistrar() { 13 GtkSignalRegistrar::GtkSignalRegistrar() {
12 } 14 }
13 15
14 GtkSignalRegistrar::~GtkSignalRegistrar() { 16 GtkSignalRegistrar::~GtkSignalRegistrar() {
15 for (HandlerMap::iterator list_iter = handler_lists_.begin(); 17 for (HandlerMap::iterator list_iter = handler_lists_.begin();
16 list_iter != handler_lists_.end(); ++list_iter) { 18 list_iter != handler_lists_.end(); ++list_iter) {
17 GObject* object = list_iter->first; 19 GObject* object = list_iter->first;
18 g_object_weak_unref(object, WeakNotifyThunk, this); 20 g_object_weak_unref(object, WeakNotifyThunk, this);
19 21
20 HandlerList& handlers = list_iter->second; 22 HandlerList& handlers = list_iter->second;
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 void GtkSignalRegistrar::WeakNotify(GObject* where_the_object_was) { 67 void GtkSignalRegistrar::WeakNotify(GObject* where_the_object_was) {
66 HandlerMap::iterator iter = handler_lists_.find(where_the_object_was); 68 HandlerMap::iterator iter = handler_lists_.find(where_the_object_was);
67 if (iter == handler_lists_.end()) { 69 if (iter == handler_lists_.end()) {
68 NOTREACHED(); 70 NOTREACHED();
69 return; 71 return;
70 } 72 }
71 // The signal handlers will be disconnected automatically. Just erase the 73 // The signal handlers will be disconnected automatically. Just erase the
72 // handler id list. 74 // handler id list.
73 handler_lists_.erase(iter); 75 handler_lists_.erase(iter);
74 } 76 }
77
78 } // namespace ui
OLDNEW
« no previous file with comments | « ui/base/gtk/gtk_signal_registrar.h ('k') | ui/base/gtk/scoped_handle_gtk.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698