OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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/magnifier/magnification_controller.h" | 5 #include "ash/magnifier/magnification_controller.h" |
6 | 6 |
7 #include "ash/accessibility_types.h" | 7 #include "ash/accessibility_types.h" |
8 #include "ash/shell.h" | 8 #include "ash/shell.h" |
9 #include "ash/test/ash_test_base.h" | 9 #include "ash/test/ash_test_base.h" |
10 #include "base/strings/stringprintf.h" | 10 #include "base/strings/stringprintf.h" |
(...skipping 23 matching lines...) Expand all Loading... |
34 class TextInputView : public views::WidgetDelegateView { | 34 class TextInputView : public views::WidgetDelegateView { |
35 public: | 35 public: |
36 TextInputView() : text_field_(new views::Textfield) { | 36 TextInputView() : text_field_(new views::Textfield) { |
37 text_field_->SetTextInputType(ui::TEXT_INPUT_TYPE_TEXT); | 37 text_field_->SetTextInputType(ui::TEXT_INPUT_TYPE_TEXT); |
38 AddChildView(text_field_); | 38 AddChildView(text_field_); |
39 SetLayoutManager(new views::FillLayout); | 39 SetLayoutManager(new views::FillLayout); |
40 } | 40 } |
41 | 41 |
42 ~TextInputView() override {} | 42 ~TextInputView() override {} |
43 | 43 |
44 gfx::Size GetPreferredSize() const override { | 44 gfx::Size CalculatePreferredSize() const override { |
45 return gfx::Size(kTextInputWindowWidth, kTextInputWindowHeight); | 45 return gfx::Size(kTextInputWindowWidth, kTextInputWindowHeight); |
46 } | 46 } |
47 | 47 |
48 void FocusOnTextInput() { text_field_->RequestFocus(); } | 48 void FocusOnTextInput() { text_field_->RequestFocus(); } |
49 | 49 |
50 private: | 50 private: |
51 views::Textfield* text_field_; // owned by views hierarchy | 51 views::Textfield* text_field_; // owned by views hierarchy |
52 | 52 |
53 DISALLOW_COPY_AND_ASSIGN(TextInputView); | 53 DISALLOW_COPY_AND_ASSIGN(TextInputView); |
54 }; | 54 }; |
(...skipping 663 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
718 GetEventGenerator().MoveMouseTo(gfx::Point(750, 250)); | 718 GetEventGenerator().MoveMouseTo(gfx::Point(750, 250)); |
719 EXPECT_FALSE(root_windows[1]->layer()->transform().IsIdentity()); | 719 EXPECT_FALSE(root_windows[1]->layer()->transform().IsIdentity()); |
720 EXPECT_TRUE(root_windows[0]->layer()->transform().IsIdentity()); | 720 EXPECT_TRUE(root_windows[0]->layer()->transform().IsIdentity()); |
721 | 721 |
722 GetMagnificationController()->SetEnabled(false); | 722 GetMagnificationController()->SetEnabled(false); |
723 EXPECT_TRUE(root_windows[1]->layer()->transform().IsIdentity()); | 723 EXPECT_TRUE(root_windows[1]->layer()->transform().IsIdentity()); |
724 EXPECT_TRUE(root_windows[0]->layer()->transform().IsIdentity()); | 724 EXPECT_TRUE(root_windows[0]->layer()->transform().IsIdentity()); |
725 } | 725 } |
726 | 726 |
727 } // namespace ash | 727 } // namespace ash |
OLD | NEW |