| 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 "ash/system/chromeos/screen_security/screen_tray_item.h" | 5 #include "ash/system/chromeos/screen_security/screen_tray_item.h" |
| 6 | 6 |
| 7 #include "ash/shell.h" | 7 #include "ash/shell.h" |
| 8 #include "ash/system/chromeos/screen_security/screen_capture_tray_item.h" | 8 #include "ash/system/chromeos/screen_security/screen_capture_tray_item.h" |
| 9 #include "ash/system/chromeos/screen_security/screen_share_tray_item.h" | 9 #include "ash/system/chromeos/screen_security/screen_share_tray_item.h" |
| 10 #include "ash/system/tray/tray_item_view.h" | 10 #include "ash/system/tray/tray_item_view.h" |
| (...skipping 21 matching lines...) Expand all Loading... |
| 32 SystemTrayNotifier* GetSystemTrayNotifier() { | 32 SystemTrayNotifier* GetSystemTrayNotifier() { |
| 33 return Shell::GetInstance()->system_tray_notifier(); | 33 return Shell::GetInstance()->system_tray_notifier(); |
| 34 } | 34 } |
| 35 | 35 |
| 36 void ClickViewCenter(views::View* view) { | 36 void ClickViewCenter(views::View* view) { |
| 37 gfx::Point click_location_in_local = | 37 gfx::Point click_location_in_local = |
| 38 gfx::Point(view->width() / 2, view->height() / 2); | 38 gfx::Point(view->width() / 2, view->height() / 2); |
| 39 view->OnMousePressed(ui::MouseEvent(ui::ET_MOUSE_PRESSED, | 39 view->OnMousePressed(ui::MouseEvent(ui::ET_MOUSE_PRESSED, |
| 40 click_location_in_local, | 40 click_location_in_local, |
| 41 click_location_in_local, | 41 click_location_in_local, |
| 42 ui::EF_NONE, |
| 42 ui::EF_NONE)); | 43 ui::EF_NONE)); |
| 43 } | 44 } |
| 44 | 45 |
| 45 class ScreenTrayItemTest : public ash::test::AshTestBase { | 46 class ScreenTrayItemTest : public ash::test::AshTestBase { |
| 46 public: | 47 public: |
| 47 ScreenTrayItemTest() | 48 ScreenTrayItemTest() |
| 48 : tray_item_(NULL), stop_callback_hit_count_(0) {} | 49 : tray_item_(NULL), stop_callback_hit_count_(0) {} |
| 49 virtual ~ScreenTrayItemTest() {} | 50 virtual ~ScreenTrayItemTest() {} |
| 50 | 51 |
| 51 ScreenTrayItem* tray_item() { return tray_item_; } | 52 ScreenTrayItem* tray_item() { return tray_item_; } |
| (...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 217 TEST_F(ScreenCaptureTest, SystemTrayInteraction) { | 218 TEST_F(ScreenCaptureTest, SystemTrayInteraction) { |
| 218 TestSystemTrayInteraction(this); | 219 TestSystemTrayInteraction(this); |
| 219 } | 220 } |
| 220 | 221 |
| 221 TEST_F(ScreenShareTest, SystemTrayInteraction) { | 222 TEST_F(ScreenShareTest, SystemTrayInteraction) { |
| 222 TestSystemTrayInteraction(this); | 223 TestSystemTrayInteraction(this); |
| 223 } | 224 } |
| 224 | 225 |
| 225 } // namespace internal | 226 } // namespace internal |
| 226 } // namespace ash | 227 } // namespace ash |
| OLD | NEW |