| OLD | NEW |
| 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 "chrome/browser/automation/automation_provider.h" | 5 #include "chrome/browser/automation/automation_provider.h" |
| 6 | 6 |
| 7 #include <set> | 7 #include <set> |
| 8 | 8 |
| 9 #include "app/l10n_util.h" | 9 #include "app/l10n_util.h" |
| 10 #include "app/message_box_flags.h" | 10 #include "app/message_box_flags.h" |
| (...skipping 922 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 933 reply_message_->WriteBool(true); | 933 reply_message_->WriteBool(true); |
| 934 for (size_t i = 0; i < redirects->size(); i++) | 934 for (size_t i = 0; i < redirects->size(); i++) |
| 935 redirects_gurl.push_back(redirects->at(i)); | 935 redirects_gurl.push_back(redirects->at(i)); |
| 936 } else { | 936 } else { |
| 937 reply_message_->WriteInt(-1); // Negative count indicates failure. | 937 reply_message_->WriteInt(-1); // Negative count indicates failure. |
| 938 } | 938 } |
| 939 | 939 |
| 940 IPC::ParamTraits<std::vector<GURL> >::Write(reply_message_, redirects_gurl); | 940 IPC::ParamTraits<std::vector<GURL> >::Write(reply_message_, redirects_gurl); |
| 941 | 941 |
| 942 Send(reply_message_); | 942 Send(reply_message_); |
| 943 redirect_query_ = 0; | 943 redirect_query_ = NULL; |
| 944 reply_message_ = NULL; | 944 reply_message_ = NULL; |
| 945 } | 945 } |
| 946 | 946 |
| 947 bool AutomationProvider::Send(IPC::Message* msg) { | 947 bool AutomationProvider::Send(IPC::Message* msg) { |
| 948 DCHECK(channel_.get()); | 948 DCHECK(channel_.get()); |
| 949 return channel_->Send(msg); | 949 return channel_->Send(msg); |
| 950 } | 950 } |
| 951 | 951 |
| 952 Browser* AutomationProvider::FindAndActivateTab( | 952 Browser* AutomationProvider::FindAndActivateTab( |
| 953 NavigationController* controller) { | 953 NavigationController* controller) { |
| (...skipping 1104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2058 for (;iter != BrowserList::end(); ++iter) { | 2058 for (;iter != BrowserList::end(); ++iter) { |
| 2059 gfx::NativeWindow this_window = (*iter)->window()->GetNativeHandle(); | 2059 gfx::NativeWindow this_window = (*iter)->window()->GetNativeHandle(); |
| 2060 if (window == this_window) { | 2060 if (window == this_window) { |
| 2061 // Add() returns the existing handle for the resource if any. | 2061 // Add() returns the existing handle for the resource if any. |
| 2062 *browser_handle = browser_tracker_->Add(*iter); | 2062 *browser_handle = browser_tracker_->Add(*iter); |
| 2063 *success = true; | 2063 *success = true; |
| 2064 return; | 2064 return; |
| 2065 } | 2065 } |
| 2066 } | 2066 } |
| 2067 } | 2067 } |
| OLD | NEW |