| OLD | NEW |
| 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 "base/macros.h" | 7 #include "base/macros.h" |
| 8 #include "build/build_config.h" | 8 #include "build/build_config.h" |
| 9 #include "chrome/browser/ui/views/chrome_views_export.h" | 9 #include "chrome/browser/ui/views/chrome_views_export.h" |
| 10 #include "chrome/grit/generated_resources.h" | 10 #include "chrome/grit/generated_resources.h" |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 } | 55 } |
| 56 ~NotificationBarClientView() override {} | 56 ~NotificationBarClientView() override {} |
| 57 | 57 |
| 58 void set_client_rect(const gfx::Rect& rect) { rect_ = rect; } | 58 void set_client_rect(const gfx::Rect& rect) { rect_ = rect; } |
| 59 | 59 |
| 60 // views::ClientView overrides. | 60 // views::ClientView overrides. |
| 61 int NonClientHitTest(const gfx::Point& point) override { | 61 int NonClientHitTest(const gfx::Point& point) override { |
| 62 if (!bounds().Contains(point)) | 62 if (!bounds().Contains(point)) |
| 63 return HTNOWHERE; | 63 return HTNOWHERE; |
| 64 // The whole window is HTCAPTION, except the |rect_|. | 64 // The whole window is HTCAPTION, except the |rect_|. |
| 65 if (rect_.Contains(gfx::PointAtOffsetFromOrigin(point - bounds().origin()))) | 65 if (rect_.Contains(gfx::PointAtOffsetFromOrigin(point - origin()))) |
| 66 return HTCLIENT; | 66 return HTCLIENT; |
| 67 | 67 |
| 68 return HTCAPTION; | 68 return HTCAPTION; |
| 69 } | 69 } |
| 70 | 70 |
| 71 private: | 71 private: |
| 72 gfx::Rect rect_; | 72 gfx::Rect rect_; |
| 73 | 73 |
| 74 DISALLOW_COPY_AND_ASSIGN(NotificationBarClientView); | 74 DISALLOW_COPY_AND_ASSIGN(NotificationBarClientView); |
| 75 }; | 75 }; |
| (...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 324 } | 324 } |
| 325 } | 325 } |
| 326 | 326 |
| 327 } // namespace | 327 } // namespace |
| 328 | 328 |
| 329 std::unique_ptr<ScreenCaptureNotificationUI> | 329 std::unique_ptr<ScreenCaptureNotificationUI> |
| 330 ScreenCaptureNotificationUI::Create(const base::string16& text) { | 330 ScreenCaptureNotificationUI::Create(const base::string16& text) { |
| 331 return std::unique_ptr<ScreenCaptureNotificationUI>( | 331 return std::unique_ptr<ScreenCaptureNotificationUI>( |
| 332 new ScreenCaptureNotificationUIViews(text)); | 332 new ScreenCaptureNotificationUIViews(text)); |
| 333 } | 333 } |
| OLD | NEW |