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

Side by Side Diff: ash/magnifier/partial_magnification_controller.cc

Issue 12816002: Make zoom filter independent of the layer size. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 9 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 | « no previous file | cc/render_pass.h » ('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 "ash/magnifier/partial_magnification_controller.h" 5 #include "ash/magnifier/partial_magnification_controller.h"
6 6
7 #include "ash/shell.h" 7 #include "ash/shell.h"
8 #include "ash/shell_window_ids.h" 8 #include "ash/shell_window_ids.h"
9 #include "ui/aura/root_window.h" 9 #include "ui/aura/root_window.h"
10 #include "ui/views/corewm/compound_event_filter.h" 10 #include "ui/views/corewm/compound_event_filter.h"
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 zoom_widget_->Show(); 154 zoom_widget_->Show();
155 155
156 aura::Window* window = zoom_widget_->GetNativeView(); 156 aura::Window* window = zoom_widget_->GetNativeView();
157 window->SetName(kPartialMagniferWindowName); 157 window->SetName(kPartialMagniferWindowName);
158 158
159 zoom_widget_->GetNativeView()->layer()->SetBounds( 159 zoom_widget_->GetNativeView()->layer()->SetBounds(
160 gfx::Rect(0, 0, 160 gfx::Rect(0, 0,
161 kMagnifierWidth, 161 kMagnifierWidth,
162 kMagnifierHeight)); 162 kMagnifierHeight));
163 zoom_widget_->GetNativeView()->layer()->SetBackgroundZoom( 163 zoom_widget_->GetNativeView()->layer()->SetBackgroundZoom(
164 (kMagnifierWidth - (kMagnifierWidth / scale_)) / 2,
165 (kMagnifierHeight - (kMagnifierHeight / scale_)) / 2,
166 scale_, 164 scale_,
167 kZoomInset); 165 kZoomInset);
168 166
169 zoom_widget_->AddObserver(this); 167 zoom_widget_->AddObserver(this);
170 } 168 }
171 169
172 void PartialMagnificationController::CloseMagnifierWindow() { 170 void PartialMagnificationController::CloseMagnifierWindow() {
173 if (zoom_widget_) { 171 if (zoom_widget_) {
174 RemoveZoomWidgetObservers(); 172 RemoveZoomWidgetObservers();
175 zoom_widget_->Close(); 173 zoom_widget_->Close();
(...skipping 28 matching lines...) Expand all
204 iter != root_windows.end(); ++iter) { 202 iter != root_windows.end(); ++iter) {
205 aura::RootWindow* root_window = *iter; 203 aura::RootWindow* root_window = *iter;
206 if (root_window->ContainsPointInRoot( 204 if (root_window->ContainsPointInRoot(
207 root_window->GetLastMouseLocationInRoot())) 205 root_window->GetLastMouseLocationInRoot()))
208 return root_window; 206 return root_window;
209 } 207 }
210 return NULL; 208 return NULL;
211 } 209 }
212 210
213 } // namespace ash 211 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | cc/render_pass.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698