| 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 "chrome/browser/ui/views/frame/browser_frame_mus.h" | 5 #include "chrome/browser/ui/views/frame/browser_frame_mus.h" |
| 6 | 6 |
| 7 #include <stdint.h> | 7 #include <stdint.h> |
| 8 | 8 |
| 9 #include "base/memory/ptr_util.h" | 9 #include "base/memory/ptr_util.h" |
| 10 #include "chrome/browser/ui/views/frame/browser_frame.h" | 10 #include "chrome/browser/ui/views/frame/browser_frame.h" |
| (...skipping 30 matching lines...) Expand all Loading... |
| 41 properties[ui::mojom::WindowManager::kDisableImmersive_InitProperty] = | 41 properties[ui::mojom::WindowManager::kDisableImmersive_InitProperty] = |
| 42 mojo::ConvertTo<std::vector<uint8_t>>(true); | 42 mojo::ConvertTo<std::vector<uint8_t>>(true); |
| 43 properties[ui::mojom::WindowManager::kAppID_Property] = | 43 properties[ui::mojom::WindowManager::kAppID_Property] = |
| 44 mojo::ConvertTo<std::vector<uint8_t>>(chrome_app_id); | 44 mojo::ConvertTo<std::vector<uint8_t>>(chrome_app_id); |
| 45 #if defined(OS_CHROMEOS) | 45 #if defined(OS_CHROMEOS) |
| 46 properties[ash::mojom::kAshWindowStyle_InitProperty] = | 46 properties[ash::mojom::kAshWindowStyle_InitProperty] = |
| 47 mojo::ConvertTo<std::vector<uint8_t>>( | 47 mojo::ConvertTo<std::vector<uint8_t>>( |
| 48 static_cast<int32_t>(ash::mojom::WindowStyle::BROWSER)); | 48 static_cast<int32_t>(ash::mojom::WindowStyle::BROWSER)); |
| 49 #endif | 49 #endif |
| 50 std::unique_ptr<views::DesktopWindowTreeHostMus> desktop_window_tree_host = | 50 std::unique_ptr<views::DesktopWindowTreeHostMus> desktop_window_tree_host = |
| 51 base::MakeUnique<views::DesktopWindowTreeHostMus>(browser_frame_, this, | 51 base::MakeUnique<views::DesktopWindowTreeHostMus>( |
| 52 &properties); | 52 browser_frame_, this, cc::FrameSinkId(), &properties); |
| 53 // BrowserNonClientFrameViewMus::OnBoundsChanged() takes care of updating | 53 // BrowserNonClientFrameViewMus::OnBoundsChanged() takes care of updating |
| 54 // the insets. | 54 // the insets. |
| 55 desktop_window_tree_host->set_auto_update_client_area(false); | 55 desktop_window_tree_host->set_auto_update_client_area(false); |
| 56 SetDesktopWindowTreeHost(std::move(desktop_window_tree_host)); | 56 SetDesktopWindowTreeHost(std::move(desktop_window_tree_host)); |
| 57 return params; | 57 return params; |
| 58 } | 58 } |
| 59 | 59 |
| 60 bool BrowserFrameMus::UseCustomFrame() const { | 60 bool BrowserFrameMus::UseCustomFrame() const { |
| 61 return true; | 61 return true; |
| 62 } | 62 } |
| (...skipping 18 matching lines...) Expand all Loading... |
| 81 } | 81 } |
| 82 | 82 |
| 83 bool BrowserFrameMus::HandleKeyboardEvent( | 83 bool BrowserFrameMus::HandleKeyboardEvent( |
| 84 const content::NativeWebKeyboardEvent& event) { | 84 const content::NativeWebKeyboardEvent& event) { |
| 85 return false; | 85 return false; |
| 86 } | 86 } |
| 87 | 87 |
| 88 int BrowserFrameMus::GetMinimizeButtonOffset() const { | 88 int BrowserFrameMus::GetMinimizeButtonOffset() const { |
| 89 return 0; | 89 return 0; |
| 90 } | 90 } |
| OLD | NEW |