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

Side by Side Diff: ui/app_list/app_list_view.cc

Issue 10540123: Rename gfx::Screen::GetMonitorXXXX to gfx::Screen::GetDisplayXXX. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 6 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/app_list/app_list_view.h" 5 #include "ui/app_list/app_list_view.h"
6 6
7 #include "ui/app_list/app_list_bubble_border.h" 7 #include "ui/app_list/app_list_bubble_border.h"
8 #include "ui/app_list/app_list_item_view.h" 8 #include "ui/app_list/app_list_item_view.h"
9 #include "ui/app_list/app_list_model.h" 9 #include "ui/app_list/app_list_model.h"
10 #include "ui/app_list/app_list_view_delegate.h" 10 #include "ui/app_list/app_list_view_delegate.h"
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 153
154 const gfx::Point old_offset = bubble_border_->offset(); 154 const gfx::Point old_offset = bubble_border_->offset();
155 const gfx::Rect anchor_rect = GetAnchorRect(); 155 const gfx::Rect anchor_rect = GetAnchorRect();
156 156
157 bubble_border_->set_offset(gfx::Point()); 157 bubble_border_->set_offset(gfx::Point());
158 gfx::Rect bubble_rect = GetBubbleFrameView()->GetUpdatedWindowBounds( 158 gfx::Rect bubble_rect = GetBubbleFrameView()->GetUpdatedWindowBounds(
159 anchor_rect, 159 anchor_rect,
160 GetPreferredSize(), 160 GetPreferredSize(),
161 false /* try_mirroring_arrow */); 161 false /* try_mirroring_arrow */);
162 162
163 gfx::Rect monitor_rect = gfx::Screen::GetMonitorNearestPoint( 163 gfx::Rect monitor_rect = gfx::Screen::GetDisplayNearestPoint(
164 anchor_rect.CenterPoint()).work_area(); 164 anchor_rect.CenterPoint()).work_area();
165 if (monitor_rect.IsEmpty() || monitor_rect.Contains(bubble_rect)) 165 if (monitor_rect.IsEmpty() || monitor_rect.Contains(bubble_rect))
166 return bubble_rect; 166 return bubble_rect;
167 167
168 gfx::Point offset; 168 gfx::Point offset;
169 169
170 if (bubble_border_->ArrowAtTopOrBottom()) { 170 if (bubble_border_->ArrowAtTopOrBottom()) {
171 if (bubble_rect.x() < monitor_rect.x()) 171 if (bubble_rect.x() < monitor_rect.x())
172 offset.set_x(monitor_rect.x() - bubble_rect.x()); 172 offset.set_x(monitor_rect.x() - bubble_rect.x());
173 else if (bubble_rect.right() > monitor_rect.right()) 173 else if (bubble_rect.right() > monitor_rect.right())
(...skipping 27 matching lines...) Expand all
201 } 201 }
202 } 202 }
203 203
204 void AppListView::OpenResult(const SearchResult& result, int event_flags) { 204 void AppListView::OpenResult(const SearchResult& result, int event_flags) {
205 if (delegate_.get()) 205 if (delegate_.get())
206 delegate_->OpenSearchResult(result, event_flags); 206 delegate_->OpenSearchResult(result, event_flags);
207 Close(); 207 Close();
208 } 208 }
209 209
210 } // namespace app_list 210 } // namespace app_list
OLDNEW
« no previous file with comments | « content/browser/renderer_host/render_widget_host_view_win.cc ('k') | ui/aura/desktop/desktop_screen_win.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698