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

Side by Side Diff: ui/chromeos/ime/mode_indicator_view.cc

Issue 866403006: Set class names for ime's view classes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src@master
Patch Set: Created 5 years, 10 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 | « ui/chromeos/ime/mode_indicator_view.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "ui/chromeos/ime/mode_indicator_view.h" 5 #include "ui/chromeos/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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 GetWidget(), 67 GetWidget(),
68 &views::Widget::Close); 68 &views::Widget::Close);
69 } 69 }
70 70
71 gfx::Size ModeIndicatorView::GetPreferredSize() const { 71 gfx::Size ModeIndicatorView::GetPreferredSize() const {
72 gfx::Size size = label_view_->GetPreferredSize(); 72 gfx::Size size = label_view_->GetPreferredSize();
73 size.SetToMax(gfx::Size(kMinSize, kMinSize)); 73 size.SetToMax(gfx::Size(kMinSize, kMinSize));
74 return size; 74 return size;
75 } 75 }
76 76
77 const char* ModeIndicatorView::GetClassName() const {
78 return "ModeIndicatorView";
79 }
80
77 void ModeIndicatorView::Init() { 81 void ModeIndicatorView::Init() {
78 SetLayoutManager(new views::FillLayout()); 82 SetLayoutManager(new views::FillLayout());
79 AddChildView(label_view_); 83 AddChildView(label_view_);
80 84
81 SetAnchorRect(cursor_bounds_); 85 SetAnchorRect(cursor_bounds_);
82 } 86 }
83 87
84 views::NonClientFrameView* ModeIndicatorView::CreateNonClientFrameView( 88 views::NonClientFrameView* ModeIndicatorView::CreateNonClientFrameView(
85 views::Widget* widget) { 89 views::Widget* widget) {
86 views::BubbleFrameView* frame = new ModeIndicatorFrameView(margins()); 90 views::BubbleFrameView* frame = new ModeIndicatorFrameView(margins());
87 // arrow adjustment in BubbleDelegateView is unnecessary because arrow 91 // arrow adjustment in BubbleDelegateView is unnecessary because arrow
88 // of this bubble is always center. 92 // of this bubble is always center.
89 frame->SetBubbleBorder(scoped_ptr<views::BubbleBorder>( 93 frame->SetBubbleBorder(scoped_ptr<views::BubbleBorder>(
90 new views::BubbleBorder(arrow(), shadow(), color()))); 94 new views::BubbleBorder(arrow(), shadow(), color())));
91 return frame; 95 return frame;
92 } 96 }
93 97
94 } // namespace ime 98 } // namespace ime
95 } // namespace ui 99 } // namespace ui
OLDNEW
« no previous file with comments | « ui/chromeos/ime/mode_indicator_view.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698