Code:   bool ChangeInputMethod(const char* name) {
     if (!IBusConnectionsAreAlive()) {
       LOG(ERROR) << "ChangeInputMethod: IBus connection is not alive";
       return false;
     }
    if (!name) {
       return false;
     }
     if (!InputMethodIdIsWhitelisted(name)) {
      LOG(ERROR) << "Input method '" << name << "' is not supported";
      return false;
    }

    RegisterProperties(NULL);
 
     ibus_bus_set_global_engine_async(ibus_,
                                     name,
                                      -1,  // use the default ibus timeout
                                      NULL,  // cancellable
                                      NULL,  // callback
                                      NULL);  // user_data
     return true;
   }

Commit Message: Remove use of libcros from InputMethodLibrary.

BUG=chromium-os:16238
TEST==confirm that input methods work as before on the netbook. Also confirm that the chrome builds and works on the desktop as before.

Review URL: http://codereview.chromium.org/7003086

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@89142 0039d316-1c4b-4281-b951-d872f2087c98
CWE ID: CWE-399
  bool ChangeInputMethod(const char* name) {
  // IBusController override.
  virtual bool ChangeInputMethod(const std::string& name) {
     if (!IBusConnectionsAreAlive()) {
       LOG(ERROR) << "ChangeInputMethod: IBus connection is not alive";
       return false;
     }
    if (name.empty()) {
       return false;
     }
     if (!InputMethodIdIsWhitelisted(name)) {
      LOG(ERROR) << "Input method '" << name << "' is not supported";
      return false;
    }

    DoRegisterProperties(NULL);
 
     ibus_bus_set_global_engine_async(ibus_,
                                     name.c_str(),
                                      -1,  // use the default ibus timeout
                                      NULL,  // cancellable
                                      NULL,  // callback
                                      NULL);  // user_data
     return true;
   }
