| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 897 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 908 content::DropData drop_data; | 908 content::DropData drop_data; |
| 909 for (size_t path_index = 0; path_index < paths->GetSize(); ++path_index) { | 909 for (size_t path_index = 0; path_index < paths->GetSize(); ++path_index) { |
| 910 base::string16 path; | 910 base::string16 path; |
| 911 if (!paths->GetString(path_index, &path)) { | 911 if (!paths->GetString(path_index, &path)) { |
| 912 AutomationJSONReply(this, reply_message) | 912 AutomationJSONReply(this, reply_message) |
| 913 .SendError("'paths' contains a non-string type"); | 913 .SendError("'paths' contains a non-string type"); |
| 914 return; | 914 return; |
| 915 } | 915 } |
| 916 | 916 |
| 917 drop_data.filenames.push_back( | 917 drop_data.filenames.push_back( |
| 918 content::DropData::FileInfo(path, base::string16())); | 918 ui::FileInfo(base::FilePath::FromUTF16Unsafe(path), base::FilePath())); |
| 919 } | 919 } |
| 920 | 920 |
| 921 const gfx::Point client(x, y); | 921 const gfx::Point client(x, y); |
| 922 // We don't set any values in screen variable because DragTarget*** ignore the | 922 // We don't set any values in screen variable because DragTarget*** ignore the |
| 923 // screen argument. | 923 // screen argument. |
| 924 const gfx::Point screen; | 924 const gfx::Point screen; |
| 925 | 925 |
| 926 int operations = 0; | 926 int operations = 0; |
| 927 operations |= blink::WebDragOperationCopy; | 927 operations |= blink::WebDragOperationCopy; |
| 928 operations |= blink::WebDragOperationLink; | 928 operations |= blink::WebDragOperationLink; |
| (...skipping 4311 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5240 if (g_browser_process) | 5240 if (g_browser_process) |
| 5241 g_browser_process->GetAutomationProviderList()->RemoveProvider(this); | 5241 g_browser_process->GetAutomationProviderList()->RemoveProvider(this); |
| 5242 } | 5242 } |
| 5243 | 5243 |
| 5244 void TestingAutomationProvider::EnsureTabSelected(Browser* browser, | 5244 void TestingAutomationProvider::EnsureTabSelected(Browser* browser, |
| 5245 WebContents* tab) { | 5245 WebContents* tab) { |
| 5246 TabStripModel* tab_strip = browser->tab_strip_model(); | 5246 TabStripModel* tab_strip = browser->tab_strip_model(); |
| 5247 if (tab_strip->GetActiveWebContents() != tab) | 5247 if (tab_strip->GetActiveWebContents() != tab) |
| 5248 tab_strip->ActivateTabAt(tab_strip->GetIndexOfWebContents(tab), true); | 5248 tab_strip->ActivateTabAt(tab_strip->GetIndexOfWebContents(tab), true); |
| 5249 } | 5249 } |
| OLD | NEW |