OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "components/exo/shell_surface.h" | 5 #include "components/exo/shell_surface.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "ash/aura/wm_window_aura.h" | 9 #include "ash/aura/wm_window_aura.h" |
10 #include "ash/common/shelf/wm_shelf.h" | 10 #include "ash/common/shelf/wm_shelf.h" |
(...skipping 1004 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1015 activatable &= !surface_->GetHitTestBounds().IsEmpty(); | 1015 activatable &= !surface_->GetHitTestBounds().IsEmpty(); |
1016 params.activatable = activatable ? views::Widget::InitParams::ACTIVATABLE_YES | 1016 params.activatable = activatable ? views::Widget::InitParams::ACTIVATABLE_YES |
1017 : views::Widget::InitParams::ACTIVATABLE_NO; | 1017 : views::Widget::InitParams::ACTIVATABLE_NO; |
1018 | 1018 |
1019 // Note: NativeWidget owns this widget. | 1019 // Note: NativeWidget owns this widget. |
1020 widget_ = new ShellSurfaceWidget(this); | 1020 widget_ = new ShellSurfaceWidget(this); |
1021 widget_->Init(params); | 1021 widget_->Init(params); |
1022 | 1022 |
1023 aura::Window* window = widget_->GetNativeWindow(); | 1023 aura::Window* window = widget_->GetNativeWindow(); |
1024 window->SetName("ExoShellSurface"); | 1024 window->SetName("ExoShellSurface"); |
| 1025 window->SetProperty(aura::client::kAccessibilityFocusFallsbackToWidgetKey, |
| 1026 false); |
1025 window->AddChild(surface_->window()); | 1027 window->AddChild(surface_->window()); |
1026 window->SetEventTargeter(base::WrapUnique(new CustomWindowTargeter(widget_))); | 1028 window->SetEventTargeter(base::WrapUnique(new CustomWindowTargeter(widget_))); |
1027 SetApplicationId(window, application_id_); | 1029 SetApplicationId(window, application_id_); |
1028 SetMainSurface(window, surface_); | 1030 SetMainSurface(window, surface_); |
1029 | 1031 |
1030 // Start tracking changes to window bounds and window state. | 1032 // Start tracking changes to window bounds and window state. |
1031 window->AddObserver(this); | 1033 window->AddObserver(this); |
1032 ash::wm::WindowState* window_state = ash::wm::GetWindowState(window); | 1034 ash::wm::WindowState* window_state = ash::wm::GetWindowState(window); |
1033 window_state->AddObserver(this); | 1035 window_state->AddObserver(this); |
1034 | 1036 |
(...skipping 367 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1402 shadow_overlay_->layer()->Add(shadow->layer()); | 1404 shadow_overlay_->layer()->Add(shadow->layer()); |
1403 window->AddChild(shadow_overlay_); | 1405 window->AddChild(shadow_overlay_); |
1404 shadow_overlay_->Show(); | 1406 shadow_overlay_->Show(); |
1405 } | 1407 } |
1406 shadow_overlay_->SetBounds(shadow_bounds); | 1408 shadow_overlay_->SetBounds(shadow_bounds); |
1407 shadow->SetContentBounds(gfx::Rect(shadow_bounds.size())); | 1409 shadow->SetContentBounds(gfx::Rect(shadow_bounds.size())); |
1408 } | 1410 } |
1409 } | 1411 } |
1410 | 1412 |
1411 } // namespace exo | 1413 } // namespace exo |
OLD | NEW |