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

Side by Side Diff: chrome/browser/ui/views/tabs/tab_strip.cc

Issue 1426933002: Refactor Windows DPI Point, Rect, and Size for Multiple Monitor DPI Awareness (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed Other Unit Tests - Moved Inner Classes Outside Created 4 years, 11 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
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/ui/views/tabs/tab_strip.h" 5 #include "chrome/browser/ui/views/tabs/tab_strip.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <iterator> 10 #include <iterator>
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 #include "ui/views/masked_targeter_delegate.h" 66 #include "ui/views/masked_targeter_delegate.h"
67 #include "ui/views/mouse_watcher_view_host.h" 67 #include "ui/views/mouse_watcher_view_host.h"
68 #include "ui/views/rect_based_targeting_utils.h" 68 #include "ui/views/rect_based_targeting_utils.h"
69 #include "ui/views/view_model_utils.h" 69 #include "ui/views/view_model_utils.h"
70 #include "ui/views/view_targeter.h" 70 #include "ui/views/view_targeter.h"
71 #include "ui/views/widget/root_view.h" 71 #include "ui/views/widget/root_view.h"
72 #include "ui/views/widget/widget.h" 72 #include "ui/views/widget/widget.h"
73 #include "ui/views/window/non_client_view.h" 73 #include "ui/views/window/non_client_view.h"
74 74
75 #if defined(OS_WIN) 75 #if defined(OS_WIN)
76 #include "ui/gfx/win/dpi.h" 76 #include "ui/gfx/screen_win.h"
77 #include "ui/gfx/win/hwnd_util.h" 77 #include "ui/gfx/win/hwnd_util.h"
78 #include "ui/views/widget/monitor_win.h" 78 #include "ui/views/widget/monitor_win.h"
79 #include "ui/views/win/hwnd_util.h" 79 #include "ui/views/win/hwnd_util.h"
80 #endif 80 #endif
81 81
82 using base::UserMetricsAction; 82 using base::UserMetricsAction;
83 using ui::DropTargetEvent; 83 using ui::DropTargetEvent;
84 84
85 namespace { 85 namespace {
86 86
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after
343 NewTabButton::~NewTabButton() { 343 NewTabButton::~NewTabButton() {
344 if (destroyed_) 344 if (destroyed_)
345 *destroyed_ = true; 345 *destroyed_ = true;
346 } 346 }
347 347
348 #if defined(OS_WIN) 348 #if defined(OS_WIN)
349 void NewTabButton::OnMouseReleased(const ui::MouseEvent& event) { 349 void NewTabButton::OnMouseReleased(const ui::MouseEvent& event) {
350 if (event.IsOnlyRightMouseButton()) { 350 if (event.IsOnlyRightMouseButton()) {
351 gfx::Point point = event.location(); 351 gfx::Point point = event.location();
352 views::View::ConvertPointToScreen(this, &point); 352 views::View::ConvertPointToScreen(this, &point);
353 point = gfx::win::DIPToScreenPoint(point); 353 point = gfx::ScreenWin::DIPToScreenPoint(point);
354 bool destroyed = false; 354 bool destroyed = false;
355 destroyed_ = &destroyed; 355 destroyed_ = &destroyed;
356 gfx::ShowSystemMenuAtPoint(views::HWNDForView(this), point); 356 gfx::ShowSystemMenuAtPoint(views::HWNDForView(this), point);
357 if (destroyed) 357 if (destroyed)
358 return; 358 return;
359 359
360 destroyed_ = NULL; 360 destroyed_ = NULL;
361 SetState(views::CustomButton::STATE_NORMAL); 361 SetState(views::CustomButton::STATE_NORMAL);
362 return; 362 return;
363 } 363 }
(...skipping 2499 matching lines...) Expand 10 before | Expand all | Expand 10 after
2863 ConvertPointToViewAndGetEventHandler(this, newtab_button_, point); 2863 ConvertPointToViewAndGetEventHandler(this, newtab_button_, point);
2864 if (view) 2864 if (view)
2865 return view; 2865 return view;
2866 } 2866 }
2867 Tab* tab = FindTabForEvent(point); 2867 Tab* tab = FindTabForEvent(point);
2868 if (tab) 2868 if (tab)
2869 return ConvertPointToViewAndGetEventHandler(this, tab, point); 2869 return ConvertPointToViewAndGetEventHandler(this, tab, point);
2870 } 2870 }
2871 return this; 2871 return this;
2872 } 2872 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698