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/ui/panels/base_panel_browser_test.h" | 5 #include "chrome/browser/ui/panels/base_panel_browser_test.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/memory/weak_ptr.h" | 9 #include "base/memory/weak_ptr.h" |
10 #include "base/message_loop.h" | 10 #include "base/message_loop.h" |
(...skipping 384 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
395 return panel; | 395 return panel; |
396 } | 396 } |
397 | 397 |
398 // static | 398 // static |
399 NativePanelTesting* BasePanelBrowserTest::CreateNativePanelTesting( | 399 NativePanelTesting* BasePanelBrowserTest::CreateNativePanelTesting( |
400 Panel* panel) { | 400 Panel* panel) { |
401 return panel->native_panel()->CreateNativePanelTesting(); | 401 return panel->native_panel()->CreateNativePanelTesting(); |
402 } | 402 } |
403 | 403 |
404 void BasePanelBrowserTest::CreateTestTabContents(Browser* browser) { | 404 void BasePanelBrowserTest::CreateTestTabContents(Browser* browser) { |
405 TabContents* tab_contents = new TabContents( | 405 TabContents* tab_contents = TabContents::Factory::CreateTabContents( |
406 WebContentsTester::CreateTestWebContents(browser->profile(), NULL)); | 406 WebContentsTester::CreateTestWebContents(browser->profile(), NULL)); |
407 chrome::AddTab(browser, tab_contents, content::PAGE_TRANSITION_LINK); | 407 chrome::AddTab(browser, tab_contents, content::PAGE_TRANSITION_LINK); |
408 } | 408 } |
409 | 409 |
410 scoped_refptr<Extension> BasePanelBrowserTest::CreateExtension( | 410 scoped_refptr<Extension> BasePanelBrowserTest::CreateExtension( |
411 const FilePath::StringType& path, | 411 const FilePath::StringType& path, |
412 Extension::Location location, | 412 Extension::Location location, |
413 const DictionaryValue& extra_value) { | 413 const DictionaryValue& extra_value) { |
414 #if defined(OS_WIN) | 414 #if defined(OS_WIN) |
415 FilePath full_path(FILE_PATH_LITERAL("c:\\")); | 415 FilePath full_path(FILE_PATH_LITERAL("c:\\")); |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
476 } | 476 } |
477 | 477 |
478 void BasePanelBrowserTest::MoveMouse(const gfx::Point& position) { | 478 void BasePanelBrowserTest::MoveMouse(const gfx::Point& position) { |
479 PanelManager::GetInstance()->mouse_watcher()->NotifyMouseMovement(position); | 479 PanelManager::GetInstance()->mouse_watcher()->NotifyMouseMovement(position); |
480 } | 480 } |
481 | 481 |
482 std::string BasePanelBrowserTest::MakePanelName(int index) { | 482 std::string BasePanelBrowserTest::MakePanelName(int index) { |
483 std::string panel_name("Panel"); | 483 std::string panel_name("Panel"); |
484 return panel_name + base::IntToString(index); | 484 return panel_name + base::IntToString(index); |
485 } | 485 } |
OLD | NEW |