OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/test/automation/tab_proxy.h" | 5 #include "chrome/test/automation/tab_proxy.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/string16.h" | 10 #include "base/string16.h" |
(...skipping 345 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
356 DOMElementProxyRef TabProxy::GetDOMDocument() { | 356 DOMElementProxyRef TabProxy::GetDOMDocument() { |
357 if (!is_valid()) | 357 if (!is_valid()) |
358 return NULL; | 358 return NULL; |
359 | 359 |
360 int element_handle; | 360 int element_handle; |
361 if (!ExecuteJavaScriptAndGetReturn("document", &element_handle)) | 361 if (!ExecuteJavaScriptAndGetReturn("document", &element_handle)) |
362 return NULL; | 362 return NULL; |
363 return GetObjectProxy<DOMElementProxy>(element_handle); | 363 return GetObjectProxy<DOMElementProxy>(element_handle); |
364 } | 364 } |
365 | 365 |
366 bool TabProxy::SetEnableExtensionAutomation( | |
367 const std::vector<std::string>& functions_enabled) { | |
368 if (!is_valid()) | |
369 return false; | |
370 | |
371 return sender_->Send(new AutomationMsg_SetEnableExtensionAutomation( | |
372 handle_, functions_enabled)); | |
373 } | |
374 | |
375 bool TabProxy::GetConstrainedWindowCount(int* count) const { | 366 bool TabProxy::GetConstrainedWindowCount(int* count) const { |
376 if (!is_valid()) | 367 if (!is_valid()) |
377 return false; | 368 return false; |
378 | 369 |
379 if (!count) { | 370 if (!count) { |
380 NOTREACHED(); | 371 NOTREACHED(); |
381 return false; | 372 return false; |
382 } | 373 } |
383 | 374 |
384 return sender_->Send(new AutomationMsg_ConstrainedWindowCount( | 375 return sender_->Send(new AutomationMsg_ConstrainedWindowCount( |
(...skipping 473 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
858 json)); | 849 json)); |
859 } | 850 } |
860 | 851 |
861 void TabProxy::FirstObjectAdded() { | 852 void TabProxy::FirstObjectAdded() { |
862 AddRef(); | 853 AddRef(); |
863 } | 854 } |
864 | 855 |
865 void TabProxy::LastObjectRemoved() { | 856 void TabProxy::LastObjectRemoved() { |
866 Release(); | 857 Release(); |
867 } | 858 } |
OLD | NEW |