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

Side by Side Diff: chrome/browser/chromeos/input_method/candidate_window.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
« no previous file with comments | « ash/wm/workspace/workspace_window_resizer.cc ('k') | chrome/browser/chromeos/login/helper.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 (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 "chrome/browser/chromeos/input_method/candidate_window.h" 5 #include "chrome/browser/chromeos/input_method/candidate_window.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 1197 matching lines...) Expand 10 before | Expand all | Expand 10 after
1208 // To avoid lookup-table overlapping, uses maximum y-position of mozc specific 1208 // To avoid lookup-table overlapping, uses maximum y-position of mozc specific
1209 // location and cursor location, because mozc-engine does not consider about 1209 // location and cursor location, because mozc-engine does not consider about
1210 // multi-line composition. 1210 // multi-line composition.
1211 const int y = should_show_at_composition_head_? 1211 const int y = should_show_at_composition_head_?
1212 std::max(composition_head_location_.y(), cursor_location_.y()) : 1212 std::max(composition_head_location_.y(), cursor_location_.y()) :
1213 cursor_location_.y(); 1213 cursor_location_.y();
1214 const int height = cursor_location_.height(); 1214 const int height = cursor_location_.height();
1215 const int horizontal_offset = GetHorizontalOffset(); 1215 const int horizontal_offset = GetHorizontalOffset();
1216 1216
1217 gfx::Rect old_bounds = parent_frame_->GetClientAreaScreenBounds(); 1217 gfx::Rect old_bounds = parent_frame_->GetClientAreaScreenBounds();
1218 gfx::Rect screen_bounds = gfx::Screen::GetMonitorNearestWindow( 1218 gfx::Rect screen_bounds = gfx::Screen::GetDisplayNearestWindow(
1219 parent_frame_->GetNativeView()).work_area(); 1219 parent_frame_->GetNativeView()).work_area();
1220 // The size. 1220 // The size.
1221 gfx::Rect frame_bounds = old_bounds; 1221 gfx::Rect frame_bounds = old_bounds;
1222 frame_bounds.set_size(GetPreferredSize()); 1222 frame_bounds.set_size(GetPreferredSize());
1223 1223
1224 // The default position. 1224 // The default position.
1225 frame_bounds.set_x(x + horizontal_offset); 1225 frame_bounds.set_x(x + horizontal_offset);
1226 frame_bounds.set_y(y + height); 1226 frame_bounds.set_y(y + height);
1227 1227
1228 // Handle overflow at the left and the top. 1228 // Handle overflow at the left and the top.
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after
1503 infolist_row->Select(); 1503 infolist_row->Select();
1504 } else { 1504 } else {
1505 infolist_row->Unselect(); 1505 infolist_row->Unselect();
1506 } 1506 }
1507 } 1507 }
1508 } 1508 }
1509 1509
1510 void InfolistWindowView::ResizeAndMoveParentFrame() { 1510 void InfolistWindowView::ResizeAndMoveParentFrame() {
1511 int x, y; 1511 int x, y;
1512 gfx::Rect old_bounds = parent_frame_->GetClientAreaScreenBounds(); 1512 gfx::Rect old_bounds = parent_frame_->GetClientAreaScreenBounds();
1513 gfx::Rect screen_bounds = gfx::Screen::GetMonitorNearestWindow( 1513 gfx::Rect screen_bounds = gfx::Screen::GetDisplayNearestWindow(
1514 parent_frame_->GetNativeView()).work_area(); 1514 parent_frame_->GetNativeView()).work_area();
1515 // The size. 1515 // The size.
1516 gfx::Rect frame_bounds = old_bounds; 1516 gfx::Rect frame_bounds = old_bounds;
1517 gfx::Size size = GetPreferredSize(); 1517 gfx::Size size = GetPreferredSize();
1518 frame_bounds.set_size(size); 1518 frame_bounds.set_size(size);
1519 1519
1520 gfx::Rect candidatewindow_bounds; 1520 gfx::Rect candidatewindow_bounds;
1521 if (candidate_window_frame_ != NULL) { 1521 if (candidate_window_frame_ != NULL) {
1522 candidatewindow_bounds = 1522 candidatewindow_bounds =
1523 candidate_window_frame_->GetClientAreaScreenBounds(); 1523 candidate_window_frame_->GetClientAreaScreenBounds();
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after
1762 } 1762 }
1763 1763
1764 // static 1764 // static
1765 CandidateWindowController* 1765 CandidateWindowController*
1766 CandidateWindowController::CreateCandidateWindowController() { 1766 CandidateWindowController::CreateCandidateWindowController() {
1767 return new CandidateWindowControllerImpl; 1767 return new CandidateWindowControllerImpl;
1768 } 1768 }
1769 1769
1770 } // namespace input_method 1770 } // namespace input_method
1771 } // namespace chromeos 1771 } // namespace chromeos
OLDNEW
« no previous file with comments | « ash/wm/workspace/workspace_window_resizer.cc ('k') | chrome/browser/chromeos/login/helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698