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

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

Issue 1608733002: Remove ui/gfx/screen_type_delegate.h (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@metro-mode-4
Patch Set: and another rebase Created 4 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/candidate_window_view.cc ('k') | ui/events/event_utils.cc » ('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 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 "base/macros.h" 8 #include "base/macros.h"
9 #include "ui/gfx/display.h" 9 #include "ui/gfx/display.h"
10 #include "ui/gfx/screen.h" 10 #include "ui/gfx/screen.h"
(...skipping 16 matching lines...) Expand all
27 27
28 class ModeIndicatorFrameView : public views::BubbleFrameView { 28 class ModeIndicatorFrameView : public views::BubbleFrameView {
29 public: 29 public:
30 explicit ModeIndicatorFrameView(const gfx::Insets& content_margins) 30 explicit ModeIndicatorFrameView(const gfx::Insets& content_margins)
31 : views::BubbleFrameView(content_margins) {} 31 : views::BubbleFrameView(content_margins) {}
32 ~ModeIndicatorFrameView() override {} 32 ~ModeIndicatorFrameView() override {}
33 33
34 private: 34 private:
35 // views::BubbleFrameView overrides: 35 // views::BubbleFrameView overrides:
36 gfx::Rect GetAvailableScreenBounds(const gfx::Rect& rect) const override { 36 gfx::Rect GetAvailableScreenBounds(const gfx::Rect& rect) const override {
37 return gfx::Screen::GetNativeScreen()->GetDisplayNearestPoint( 37 return gfx::Screen::GetScreen()
38 rect.CenterPoint()).bounds(); 38 ->GetDisplayNearestPoint(rect.CenterPoint())
39 .bounds();
39 } 40 }
40 41
41 DISALLOW_COPY_AND_ASSIGN(ModeIndicatorFrameView); 42 DISALLOW_COPY_AND_ASSIGN(ModeIndicatorFrameView);
42 }; 43 };
43 44
44 } // namespace 45 } // namespace
45 46
46 47
47 ModeIndicatorView::ModeIndicatorView(gfx::NativeView parent, 48 ModeIndicatorView::ModeIndicatorView(gfx::NativeView parent,
48 const gfx::Rect& cursor_bounds, 49 const gfx::Rect& cursor_bounds,
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 views::BubbleFrameView* frame = new ModeIndicatorFrameView(margins()); 92 views::BubbleFrameView* frame = new ModeIndicatorFrameView(margins());
92 // arrow adjustment in BubbleDelegateView is unnecessary because arrow 93 // arrow adjustment in BubbleDelegateView is unnecessary because arrow
93 // of this bubble is always center. 94 // of this bubble is always center.
94 frame->SetBubbleBorder(scoped_ptr<views::BubbleBorder>( 95 frame->SetBubbleBorder(scoped_ptr<views::BubbleBorder>(
95 new views::BubbleBorder(arrow(), shadow(), color()))); 96 new views::BubbleBorder(arrow(), shadow(), color())));
96 return frame; 97 return frame;
97 } 98 }
98 99
99 } // namespace ime 100 } // namespace ime
100 } // namespace ui 101 } // namespace ui
OLDNEW
« no previous file with comments | « ui/chromeos/ime/candidate_window_view.cc ('k') | ui/events/event_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698