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 23 matching lines...) Expand all Loading... |
34 params.name = "BrowserFrame"; | 34 params.name = "BrowserFrame"; |
35 params.native_widget = this; | 35 params.native_widget = this; |
36 params.bounds = gfx::Rect(10, 10, 640, 480); | 36 params.bounds = gfx::Rect(10, 10, 640, 480); |
37 params.delegate = browser_view_; | 37 params.delegate = browser_view_; |
38 std::map<std::string, std::vector<uint8_t>> properties = | 38 std::map<std::string, std::vector<uint8_t>> properties = |
39 views::MusClient::ConfigurePropertiesFromParams(params); | 39 views::MusClient::ConfigurePropertiesFromParams(params); |
40 const std::string chrome_app_id(extension_misc::kChromeAppId); | 40 const std::string chrome_app_id(extension_misc::kChromeAppId); |
41 // Indicates mash shouldn't handle immersive, rather we will. | 41 // Indicates mash shouldn't handle immersive, rather we will. |
42 properties[ui::mojom::WindowManager::kDisableImmersive_InitProperty] = | 42 properties[ui::mojom::WindowManager::kDisableImmersive_InitProperty] = |
43 mojo::ConvertTo<std::vector<uint8_t>>(true); | 43 mojo::ConvertTo<std::vector<uint8_t>>(true); |
44 properties[ui::mojom::WindowManager::kAppID_Property] = | |
45 mojo::ConvertTo<std::vector<uint8_t>>(chrome_app_id); | |
46 #if defined(OS_CHROMEOS) | 44 #if defined(OS_CHROMEOS) |
47 properties[ash::mojom::kAshWindowStyle_InitProperty] = | 45 properties[ash::mojom::kAshWindowStyle_InitProperty] = |
48 mojo::ConvertTo<std::vector<uint8_t>>( | 46 mojo::ConvertTo<std::vector<uint8_t>>( |
49 static_cast<int32_t>(ash::mojom::WindowStyle::BROWSER)); | 47 static_cast<int32_t>(ash::mojom::WindowStyle::BROWSER)); |
50 #endif | 48 #endif |
51 aura::WindowTreeHostMusInitParams window_tree_host_init_params = | 49 aura::WindowTreeHostMusInitParams window_tree_host_init_params = |
52 aura::CreateInitParamsForTopLevel( | 50 aura::CreateInitParamsForTopLevel( |
53 views::MusClient::Get()->window_tree_client(), std::move(properties)); | 51 views::MusClient::Get()->window_tree_client(), std::move(properties)); |
54 std::unique_ptr<views::DesktopWindowTreeHostMus> desktop_window_tree_host = | 52 std::unique_ptr<views::DesktopWindowTreeHostMus> desktop_window_tree_host = |
55 base::MakeUnique<views::DesktopWindowTreeHostMus>( | 53 base::MakeUnique<views::DesktopWindowTreeHostMus>( |
(...skipping 29 matching lines...) Expand all Loading... |
85 } | 83 } |
86 | 84 |
87 bool BrowserFrameMus::HandleKeyboardEvent( | 85 bool BrowserFrameMus::HandleKeyboardEvent( |
88 const content::NativeWebKeyboardEvent& event) { | 86 const content::NativeWebKeyboardEvent& event) { |
89 return false; | 87 return false; |
90 } | 88 } |
91 | 89 |
92 int BrowserFrameMus::GetMinimizeButtonOffset() const { | 90 int BrowserFrameMus::GetMinimizeButtonOffset() const { |
93 return 0; | 91 return 0; |
94 } | 92 } |
OLD | NEW |