| OLD | NEW | 
|     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/pepper_flash_settings_manager.h" |     5 #include "chrome/browser/pepper_flash_settings_manager.h" | 
|     6  |     6  | 
|     7 #include <map> |     7 #include <map> | 
|     8 #include <utility> |     8 #include <utility> | 
|     9 #include <vector> |     9 #include <vector> | 
|    10  |    10  | 
| (...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|   346  |   346  | 
|   347   DCHECK(state_ == STATE_UNINITIALIZED); |   347   DCHECK(state_ == STATE_UNINITIALIZED); | 
|   348   DCHECK(!channel_.get()); |   348   DCHECK(!channel_.get()); | 
|   349  |   349  | 
|   350   if (!success) { |   350   if (!success) { | 
|   351     DLOG(ERROR) << "Couldn't open plugin channel"; |   351     DLOG(ERROR) << "Couldn't open plugin channel"; | 
|   352     NotifyErrorFromIOThread(); |   352     NotifyErrorFromIOThread(); | 
|   353     return; |   353     return; | 
|   354   } |   354   } | 
|   355  |   355  | 
|   356   channel_.reset(new IPC::Channel(handle, IPC::Channel::MODE_CLIENT, this)); |   356   channel_ = IPC::Channel::CreateClient(handle, this); | 
|   357   if (!channel_->Connect()) { |   357   if (!channel_->Connect()) { | 
|   358     DLOG(ERROR) << "Couldn't connect to plugin"; |   358     DLOG(ERROR) << "Couldn't connect to plugin"; | 
|   359     NotifyErrorFromIOThread(); |   359     NotifyErrorFromIOThread(); | 
|   360     return; |   360     return; | 
|   361   } |   361   } | 
|   362  |   362  | 
|   363   state_ = STATE_INITIALIZED; |   363   state_ = STATE_INITIALIZED; | 
|   364  |   364  | 
|   365   std::vector<PendingRequest> temp_pending_requests; |   365   std::vector<PendingRequest> temp_pending_requests; | 
|   366   temp_pending_requests.swap(pending_requests_); |   366   temp_pending_requests.swap(pending_requests_); | 
| (...skipping 695 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  1062 } |  1062 } | 
|  1063  |  1063  | 
|  1064 void PepperFlashSettingsManager::OnError(Core* core) { |  1064 void PepperFlashSettingsManager::OnError(Core* core) { | 
|  1065   DCHECK(core); |  1065   DCHECK(core); | 
|  1066   if (core != core_.get()) |  1066   if (core != core_.get()) | 
|  1067     return; |  1067     return; | 
|  1068  |  1068  | 
|  1069   core_->Detach(); |  1069   core_->Detach(); | 
|  1070   core_ = NULL; |  1070   core_ = NULL; | 
|  1071 } |  1071 } | 
| OLD | NEW |