OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/ime/mode_indicator_view.h" | 5 #include "ash/ime/mode_indicator_view.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "ui/gfx/display.h" | 8 #include "ui/gfx/display.h" |
9 #include "ui/gfx/screen.h" | 9 #include "ui/gfx/screen.h" |
10 #include "ui/views/bubble/bubble_delegate.h" | 10 #include "ui/views/bubble/bubble_delegate.h" |
(...skipping 30 matching lines...) Expand all Loading... |
41 }; | 41 }; |
42 | 42 |
43 } // namespace | 43 } // namespace |
44 | 44 |
45 | 45 |
46 ModeIndicatorView::ModeIndicatorView(gfx::NativeView parent, | 46 ModeIndicatorView::ModeIndicatorView(gfx::NativeView parent, |
47 const gfx::Rect& cursor_bounds, | 47 const gfx::Rect& cursor_bounds, |
48 const base::string16& label) | 48 const base::string16& label) |
49 : cursor_bounds_(cursor_bounds), | 49 : cursor_bounds_(cursor_bounds), |
50 label_view_(new views::Label(label)) { | 50 label_view_(new views::Label(label)) { |
51 set_use_focusless(true); | 51 set_can_activate(false); |
52 set_accept_events(false); | 52 set_accept_events(false); |
53 set_parent_window(parent); | 53 set_parent_window(parent); |
54 set_shadow(views::BubbleBorder::NO_SHADOW); | 54 set_shadow(views::BubbleBorder::NO_SHADOW); |
55 set_arrow(views::BubbleBorder::TOP_CENTER); | 55 set_arrow(views::BubbleBorder::TOP_CENTER); |
56 } | 56 } |
57 | 57 |
58 ModeIndicatorView::~ModeIndicatorView() {} | 58 ModeIndicatorView::~ModeIndicatorView() {} |
59 | 59 |
60 void ModeIndicatorView::ShowAndFadeOut() { | 60 void ModeIndicatorView::ShowAndFadeOut() { |
61 wm::SetWindowVisibilityAnimationTransition( | 61 wm::SetWindowVisibilityAnimationTransition( |
(...skipping 24 matching lines...) Expand all Loading... |
86 views::BubbleFrameView* frame = new ModeIndicatorFrameView(margins()); | 86 views::BubbleFrameView* frame = new ModeIndicatorFrameView(margins()); |
87 // arrow adjustment in BubbleDelegateView is unnecessary because arrow | 87 // arrow adjustment in BubbleDelegateView is unnecessary because arrow |
88 // of this bubble is always center. | 88 // of this bubble is always center. |
89 frame->SetBubbleBorder(scoped_ptr<views::BubbleBorder>( | 89 frame->SetBubbleBorder(scoped_ptr<views::BubbleBorder>( |
90 new views::BubbleBorder(arrow(), shadow(), color()))); | 90 new views::BubbleBorder(arrow(), shadow(), color()))); |
91 return frame; | 91 return frame; |
92 } | 92 } |
93 | 93 |
94 } // namespace ime | 94 } // namespace ime |
95 } // namespace ash | 95 } // namespace ash |
OLD | NEW |