| OLD | NEW |
| 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/panels/panel_view.h" | 5 #include "chrome/browser/ui/views/panels/panel_view.h" |
| 6 | 6 |
| 7 #include <map> | 7 #include <map> |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "base/utf_string_conversions.h" | 9 #include "base/utf_string_conversions.h" |
| 10 #include "chrome/app/chrome_command_ids.h" | 10 #include "chrome/app/chrome_command_ids.h" |
| (...skipping 376 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 387 } | 387 } |
| 388 | 388 |
| 389 void PanelView::ActivatePanel() { | 389 void PanelView::ActivatePanel() { |
| 390 window_->Activate(); | 390 window_->Activate(); |
| 391 } | 391 } |
| 392 | 392 |
| 393 void PanelView::DeactivatePanel() { | 393 void PanelView::DeactivatePanel() { |
| 394 if (!focused_) | 394 if (!focused_) |
| 395 return; | 395 return; |
| 396 | 396 |
| 397 #if defined(OS_WIN) && !defined(AURA) && !defined(USE_ASH) | 397 #if defined(OS_WIN) |
| 398 // Need custom behavior for always-on-top panels to avoid | 398 // Need custom behavior for always-on-top panels to avoid |
| 399 // the OS activating a minimized panel when this one is | 399 // the OS activating a minimized panel when this one is |
| 400 // deactivated. | 400 // deactivated. |
| 401 if (always_on_top_) { | 401 if (always_on_top_) { |
| 402 ::SetForegroundWindow(::GetDesktopWindow()); | 402 ::SetForegroundWindow(::GetDesktopWindow()); |
| 403 return; | 403 return; |
| 404 } | 404 } |
| 405 #endif | 405 #endif |
| 406 | 406 |
| 407 window_->Deactivate(); | 407 window_->Deactivate(); |
| (...skipping 505 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 913 DCHECK(thickness_for_mouse_resizing > 0); | 913 DCHECK(thickness_for_mouse_resizing > 0); |
| 914 SkRegion* region = new SkRegion; | 914 SkRegion* region = new SkRegion; |
| 915 region->op(0, 0, thickness_for_mouse_resizing, height, SkRegion::kUnion_Op); | 915 region->op(0, 0, thickness_for_mouse_resizing, height, SkRegion::kUnion_Op); |
| 916 region->op(width - thickness_for_mouse_resizing, 0, width, height, | 916 region->op(width - thickness_for_mouse_resizing, 0, width, height, |
| 917 SkRegion::kUnion_Op); | 917 SkRegion::kUnion_Op); |
| 918 region->op(0, height - thickness_for_mouse_resizing, width, height, | 918 region->op(0, height - thickness_for_mouse_resizing, width, height, |
| 919 SkRegion::kUnion_Op); | 919 SkRegion::kUnion_Op); |
| 920 web_contents->GetRenderViewHost()->GetView()->SetClickthroughRegion(region); | 920 web_contents->GetRenderViewHost()->GetView()->SetClickthroughRegion(region); |
| 921 #endif | 921 #endif |
| 922 } | 922 } |
| OLD | NEW |