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

Side by Side Diff: chrome/browser/chromeos/input_method/ibus_controller_impl.cc

Issue 10413062: More strict check for IBusPanelService. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Refine checking. Created 8 years, 7 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
« no previous file with comments | « no previous file | no next file » | 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "chrome/browser/chromeos/input_method/ibus_controller_impl.h" 5 #include "chrome/browser/chromeos/input_method/ibus_controller_impl.h"
6 6
7 #include <algorithm> // for std::reverse. 7 #include <algorithm> // for std::reverse.
8 #include <cstdio> 8 #include <cstdio>
9 #include <cstring> // for std::strcmp. 9 #include <cstring> // for std::strcmp.
10 #include <set> 10 #include <set>
(...skipping 467 matching lines...) Expand 10 before | Expand all | Expand 10 after
478 g_signal_handlers_disconnect_by_func( 478 g_signal_handlers_disconnect_by_func(
479 ibus_, 479 ibus_,
480 reinterpret_cast<gpointer>(G_CALLBACK(BusDisconnectedThunk)), 480 reinterpret_cast<gpointer>(G_CALLBACK(BusDisconnectedThunk)),
481 this); 481 this);
482 g_signal_handlers_disconnect_by_func( 482 g_signal_handlers_disconnect_by_func(
483 ibus_, 483 ibus_,
484 reinterpret_cast<gpointer>(G_CALLBACK(BusNameOwnerChangedThunk)), 484 reinterpret_cast<gpointer>(G_CALLBACK(BusNameOwnerChangedThunk)),
485 this); 485 this);
486 486
487 // Disconnect signals for the panel service as well. 487 // Disconnect signals for the panel service as well.
488 IBusPanelService* ibus_panel_service = IBUS_PANEL_SERVICE( 488 void* attached_data = g_object_get_data(G_OBJECT(ibus_), kPanelObjectKey);
Yusuke Sato 2012/05/23 00:43:08 please add a comment which explains when/why g_obj
Seigo Nonaka 2012/05/23 00:56:59 I don't know why g_object_get_data fails. (I doubt
489 g_object_get_data(G_OBJECT(ibus_), kPanelObjectKey)); 489 if (!attached_data)
490 return;
491 if (!G_TYPE_CHECK_INSTANCE_TYPE(attached_data, IBUS_TYPE_PANEL_SERVICE))
492 return;
493 IBusPanelService* ibus_panel_service = IBUS_PANEL_SERVICE(attached_data);
490 if (ibus_panel_service) { 494 if (ibus_panel_service) {
491 g_signal_handlers_disconnect_by_func( 495 g_signal_handlers_disconnect_by_func(
492 ibus_panel_service, 496 ibus_panel_service,
493 reinterpret_cast<gpointer>(G_CALLBACK(FocusInThunk)), 497 reinterpret_cast<gpointer>(G_CALLBACK(FocusInThunk)),
494 this); 498 this);
495 g_signal_handlers_disconnect_by_func( 499 g_signal_handlers_disconnect_by_func(
496 ibus_panel_service, 500 ibus_panel_service,
497 reinterpret_cast<gpointer>(G_CALLBACK(RegisterPropertiesThunk)), 501 reinterpret_cast<gpointer>(G_CALLBACK(RegisterPropertiesThunk)),
498 this); 502 this);
499 g_signal_handlers_disconnect_by_func( 503 g_signal_handlers_disconnect_by_func(
(...skipping 608 matching lines...) Expand 10 before | Expand all | Expand 10 after
1108 1112
1109 // static 1113 // static
1110 bool IBusControllerImpl::FindAndUpdatePropertyForTesting( 1114 bool IBusControllerImpl::FindAndUpdatePropertyForTesting(
1111 const chromeos::input_method::InputMethodProperty& new_prop, 1115 const chromeos::input_method::InputMethodProperty& new_prop,
1112 chromeos::input_method::InputMethodPropertyList* prop_list) { 1116 chromeos::input_method::InputMethodPropertyList* prop_list) {
1113 return FindAndUpdateProperty(new_prop, prop_list); 1117 return FindAndUpdateProperty(new_prop, prop_list);
1114 } 1118 }
1115 1119
1116 } // namespace input_method 1120 } // namespace input_method
1117 } // namespace chromeos 1121 } // namespace chromeos
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698