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

Side by Side Diff: chrome/browser/ui/views/screen_capture_notification_ui_views.cc

Issue 19115003: Make the maximize button more easily hittable when there is a huge amount of tabs present (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Changed completely Created 7 years, 5 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/screen_capture_notification_ui.h" 5 #include "chrome/browser/ui/screen_capture_notification_ui.h"
6 6
7 #include "ash/shell.h" 7 #include "ash/shell.h"
8 #include "chrome/app/chrome_dll_resource.h" 8 #include "chrome/app/chrome_dll_resource.h"
9 #include "chrome/browser/ui/views/chrome_views_export.h" 9 #include "chrome/browser/ui/views/chrome_views_export.h"
10 #include "grit/generated_resources.h" 10 #include "grit/generated_resources.h"
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 NotificationBarClientView(views::Widget* widget, views::View* view) 42 NotificationBarClientView(views::Widget* widget, views::View* view)
43 : views::ClientView(widget, view) { 43 : views::ClientView(widget, view) {
44 } 44 }
45 virtual ~NotificationBarClientView() {} 45 virtual ~NotificationBarClientView() {}
46 46
47 void SetClientRect(const gfx::Rect& rect) { 47 void SetClientRect(const gfx::Rect& rect) {
48 rect_ = rect; 48 rect_ = rect;
49 } 49 }
50 50
51 // views::ClientView overrides. 51 // views::ClientView overrides.
52 virtual int NonClientHitTest(const gfx::Point& point) OVERRIDE { 52 virtual int NonClientHitTest(const gfx::Point& point) const OVERRIDE {
53 if (!bounds().Contains(point)) 53 if (!bounds().Contains(point))
54 return HTNOWHERE; 54 return HTNOWHERE;
55 // The whole window is HTCAPTION, except the |rect_|. 55 // The whole window is HTCAPTION, except the |rect_|.
56 if (rect_.Contains(gfx::PointAtOffsetFromOrigin(point - bounds().origin()))) 56 if (rect_.Contains(gfx::PointAtOffsetFromOrigin(point - bounds().origin())))
57 return HTCLIENT; 57 return HTCLIENT;
58 58
59 return HTCAPTION; 59 return HTCAPTION;
60 } 60 }
61 61
62 private: 62 private:
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
277 callback.Run(); 277 callback.Run();
278 } 278 }
279 } 279 }
280 280
281 } // namespace 281 } // namespace
282 282
283 scoped_ptr<ScreenCaptureNotificationUI> ScreenCaptureNotificationUI::Create() { 283 scoped_ptr<ScreenCaptureNotificationUI> ScreenCaptureNotificationUI::Create() {
284 return scoped_ptr<ScreenCaptureNotificationUI>( 284 return scoped_ptr<ScreenCaptureNotificationUI>(
285 new ScreenCaptureNotificationUIViews()); 285 new ScreenCaptureNotificationUIViews());
286 } 286 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698