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/message_loop.h" | 9 #include "base/message_loop.h" |
10 #include "base/utf_string_conversions.h" | 10 #include "base/utf_string_conversions.h" |
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
266 GetAcceleratorTable(); | 266 GetAcceleratorTable(); |
267 for (std::map<ui::Accelerator, int>::const_iterator iter = | 267 for (std::map<ui::Accelerator, int>::const_iterator iter = |
268 accelerator_table.begin(); | 268 accelerator_table.begin(); |
269 iter != accelerator_table.end(); ++iter) { | 269 iter != accelerator_table.end(); ++iter) { |
270 focus_manager->RegisterAccelerator( | 270 focus_manager->RegisterAccelerator( |
271 iter->first, ui::AcceleratorManager::kNormalPriority, this); | 271 iter->first, ui::AcceleratorManager::kNormalPriority, this); |
272 } | 272 } |
273 | 273 |
274 #if defined(OS_WIN) | 274 #if defined(OS_WIN) |
275 ui::win::SetAppIdForWindow( | 275 ui::win::SetAppIdForWindow( |
276 ShellIntegration::GetAppModelIdForProfile( | 276 ShellIntegration::GetAppModelIdForProfile(UTF8ToWide(panel->app_name()), |
277 base::UTF8ToWide(panel->app_name()), | 277 panel->profile()->GetPath()), |
278 panel->profile()->GetPath()), | |
279 chrome::HWNDForWidget(window_)); | 278 chrome::HWNDForWidget(window_)); |
280 #endif | 279 #endif |
281 } | 280 } |
282 | 281 |
283 PanelView::~PanelView() { | 282 PanelView::~PanelView() { |
284 } | 283 } |
285 | 284 |
286 void PanelView::ShowPanel() { | 285 void PanelView::ShowPanel() { |
287 ShowPanelInactive(); | 286 ShowPanelInactive(); |
288 ActivatePanel(); | 287 ActivatePanel(); |
(...skipping 667 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
956 DCHECK(thickness_for_mouse_resizing > 0); | 955 DCHECK(thickness_for_mouse_resizing > 0); |
957 SkRegion* region = new SkRegion; | 956 SkRegion* region = new SkRegion; |
958 region->op(0, 0, thickness_for_mouse_resizing, height, SkRegion::kUnion_Op); | 957 region->op(0, 0, thickness_for_mouse_resizing, height, SkRegion::kUnion_Op); |
959 region->op(width - thickness_for_mouse_resizing, 0, width, height, | 958 region->op(width - thickness_for_mouse_resizing, 0, width, height, |
960 SkRegion::kUnion_Op); | 959 SkRegion::kUnion_Op); |
961 region->op(0, height - thickness_for_mouse_resizing, width, height, | 960 region->op(0, height - thickness_for_mouse_resizing, width, height, |
962 SkRegion::kUnion_Op); | 961 SkRegion::kUnion_Op); |
963 web_contents->GetRenderViewHost()->GetView()->SetClickthroughRegion(region); | 962 web_contents->GetRenderViewHost()->GetView()->SetClickthroughRegion(region); |
964 #endif | 963 #endif |
965 } | 964 } |
OLD | NEW |