Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(96)

Side by Side Diff: ash/magnifier/magnification_controller_unittest.cc

Issue 2901503003: Rename GetPreferredSize to CalculatePreferredSize in ash/ (Closed)
Patch Set: improvements Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ash/frame/custom_frame_view_ash.cc ('k') | ash/shelf/overflow_bubble_view.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « ash/frame/custom_frame_view_ash.cc ('k') | ash/shelf/overflow_bubble_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698