| 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 "base/json/json_reader.h" | 7 #include "base/json/json_reader.h" |
| 8 #include "base/keyboard_codes.h" | 8 #include "base/keyboard_codes.h" |
| 9 #include "chrome/browser/automation/automation_extension_function.h" | 9 #include "chrome/browser/automation/automation_extension_function.h" |
| 10 #include "chrome/browser/automation/extension_automation_constants.h" | 10 #include "chrome/browser/automation/extension_automation_constants.h" |
| (...skipping 572 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 583 int handle, int navigation_index, | 583 int handle, int navigation_index, |
| 584 AutomationMsg_NavigationResponseValues* status) { | 584 AutomationMsg_NavigationResponseValues* status) { |
| 585 *status = AUTOMATION_MSG_NAVIGATION_ERROR; | 585 *status = AUTOMATION_MSG_NAVIGATION_ERROR; |
| 586 | 586 |
| 587 if (tab_tracker_->ContainsHandle(handle)) { | 587 if (tab_tracker_->ContainsHandle(handle)) { |
| 588 NavigationController* tab = tab_tracker_->GetResource(handle); | 588 NavigationController* tab = tab_tracker_->GetResource(handle); |
| 589 tab->GoToIndex(navigation_index); | 589 tab->GoToIndex(navigation_index); |
| 590 *status = AUTOMATION_MSG_NAVIGATION_SUCCESS; | 590 *status = AUTOMATION_MSG_NAVIGATION_SUCCESS; |
| 591 } | 591 } |
| 592 } | 592 } |
| 593 |
| 594 void AutomationProvider::OnRunUnloadHandlers( |
| 595 int handle, gfx::NativeWindow notification_window, |
| 596 int notification_message) { |
| 597 ExternalTabContainer* external_tab = GetExternalTabForHandle(handle); |
| 598 if (external_tab) { |
| 599 external_tab->RunUnloadHandlers(notification_window, notification_message); |
| 600 } |
| 601 } |
| 602 |
| OLD | NEW |