| 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/automation/testing_automation_provider.h" | 5 #include "chrome/browser/automation/testing_automation_provider.h" |
| 6 | 6 |
| 7 #include <map> | 7 #include <map> |
| 8 #include <set> | 8 #include <set> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 5940 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5951 AutomationJSONReply(this, reply_message).SendSuccess(&dict); | 5951 AutomationJSONReply(this, reply_message).SendSuccess(&dict); |
| 5952 } | 5952 } |
| 5953 | 5953 |
| 5954 void TestingAutomationProvider::AcceptCurrentFullscreenOrMouseLockRequest( | 5954 void TestingAutomationProvider::AcceptCurrentFullscreenOrMouseLockRequest( |
| 5955 Browser* browser, | 5955 Browser* browser, |
| 5956 base::DictionaryValue* args, | 5956 base::DictionaryValue* args, |
| 5957 IPC::Message* reply_message) { | 5957 IPC::Message* reply_message) { |
| 5958 WebContents* fullscreen_tab = chrome::GetActiveWebContents(browser); | 5958 WebContents* fullscreen_tab = chrome::GetActiveWebContents(browser); |
| 5959 FullscreenExitBubbleType type = | 5959 FullscreenExitBubbleType type = |
| 5960 browser->fullscreen_controller_->GetFullscreenExitBubbleType(); | 5960 browser->fullscreen_controller_->GetFullscreenExitBubbleType(); |
| 5961 browser->OnAcceptFullscreenPermission(fullscreen_tab->GetURL(), type); | 5961 browser->fullscreen_controller_->OnAcceptFullscreenPermission( |
| 5962 fullscreen_tab->GetURL(), type); |
| 5962 AutomationJSONReply(this, reply_message).SendSuccess(NULL); | 5963 AutomationJSONReply(this, reply_message).SendSuccess(NULL); |
| 5963 } | 5964 } |
| 5964 | 5965 |
| 5965 void TestingAutomationProvider::DenyCurrentFullscreenOrMouseLockRequest( | 5966 void TestingAutomationProvider::DenyCurrentFullscreenOrMouseLockRequest( |
| 5966 Browser* browser, | 5967 Browser* browser, |
| 5967 base::DictionaryValue* args, | 5968 base::DictionaryValue* args, |
| 5968 IPC::Message* reply_message) { | 5969 IPC::Message* reply_message) { |
| 5969 FullscreenExitBubbleType type = | 5970 FullscreenExitBubbleType type = |
| 5970 browser->fullscreen_controller_->GetFullscreenExitBubbleType(); | 5971 browser->fullscreen_controller_->GetFullscreenExitBubbleType(); |
| 5971 browser->OnDenyFullscreenPermission(type); | 5972 browser->fullscreen_controller_->OnDenyFullscreenPermission(type); |
| 5972 AutomationJSONReply(this, reply_message).SendSuccess(NULL); | 5973 AutomationJSONReply(this, reply_message).SendSuccess(NULL); |
| 5973 } | 5974 } |
| 5974 | 5975 |
| 5975 void TestingAutomationProvider::WaitForAllViewsToStopLoading( | 5976 void TestingAutomationProvider::WaitForAllViewsToStopLoading( |
| 5976 DictionaryValue* args, | 5977 DictionaryValue* args, |
| 5977 IPC::Message* reply_message) { | 5978 IPC::Message* reply_message) { |
| 5978 if (AppModalDialogQueue::GetInstance()->HasActiveDialog()) { | 5979 if (AppModalDialogQueue::GetInstance()->HasActiveDialog()) { |
| 5979 AutomationJSONReply(this, reply_message).SendSuccess(NULL); | 5980 AutomationJSONReply(this, reply_message).SendSuccess(NULL); |
| 5980 return; | 5981 return; |
| 5981 } | 5982 } |
| (...skipping 785 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6767 void TestingAutomationProvider::OnRemoveProvider() { | 6768 void TestingAutomationProvider::OnRemoveProvider() { |
| 6768 if (g_browser_process) | 6769 if (g_browser_process) |
| 6769 g_browser_process->GetAutomationProviderList()->RemoveProvider(this); | 6770 g_browser_process->GetAutomationProviderList()->RemoveProvider(this); |
| 6770 } | 6771 } |
| 6771 | 6772 |
| 6772 void TestingAutomationProvider::EnsureTabSelected(Browser* browser, | 6773 void TestingAutomationProvider::EnsureTabSelected(Browser* browser, |
| 6773 WebContents* tab) { | 6774 WebContents* tab) { |
| 6774 if (chrome::GetActiveWebContents(browser) != tab) | 6775 if (chrome::GetActiveWebContents(browser) != tab) |
| 6775 chrome::ActivateTabAt(browser, chrome::GetIndexOfTab(browser, tab), true); | 6776 chrome::ActivateTabAt(browser, chrome::GetIndexOfTab(browser, tab), true); |
| 6776 } | 6777 } |
| OLD | NEW |