Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(170)

Side by Side Diff: ui/views/mus/native_widget_mus.cc

Issue 1832133002: mus: Remove unnecessary const from property TypeConverter templates (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: format Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « mash/wm/user_window_controller_impl.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "ui/views/mus/native_widget_mus.h" 5 #include "ui/views/mus/native_widget_mus.h"
6 6
7 #include "base/macros.h" 7 #include "base/macros.h"
8 #include "base/thread_task_runner_handle.h" 8 #include "base/thread_task_runner_handle.h"
9 #include "components/mus/public/cpp/property_type_converters.h" 9 #include "components/mus/public/cpp/property_type_converters.h"
10 #include "components/mus/public/cpp/window.h" 10 #include "components/mus/public/cpp/window.h"
(...skipping 331 matching lines...) Expand 10 before | Expand all | Expand 10 after
342 342
343 //////////////////////////////////////////////////////////////////////////////// 343 ////////////////////////////////////////////////////////////////////////////////
344 // NativeWidgetMus, private: 344 // NativeWidgetMus, private:
345 345
346 // static 346 // static
347 void NativeWidgetMus::ConfigurePropertiesForNewWindow( 347 void NativeWidgetMus::ConfigurePropertiesForNewWindow(
348 const Widget::InitParams& init_params, 348 const Widget::InitParams& init_params,
349 std::map<std::string, std::vector<uint8_t>>* properties) { 349 std::map<std::string, std::vector<uint8_t>>* properties) {
350 if (!init_params.bounds.IsEmpty()) { 350 if (!init_params.bounds.IsEmpty()) {
351 (*properties)[mus::mojom::WindowManager::kUserSetBounds_Property] = 351 (*properties)[mus::mojom::WindowManager::kUserSetBounds_Property] =
352 mojo::TypeConverter<const std::vector<uint8_t>, gfx::Rect>::Convert( 352 mojo::ConvertTo<std::vector<uint8_t>>(init_params.bounds);
353 init_params.bounds);
354 } 353 }
355 354
356 if (!Widget::RequiresNonClientView(init_params.type)) 355 if (!Widget::RequiresNonClientView(init_params.type))
357 return; 356 return;
358 357
359 (*properties)[mus::mojom::WindowManager::kWindowType_Property] = 358 (*properties)[mus::mojom::WindowManager::kWindowType_Property] =
360 mojo::TypeConverter<const std::vector<uint8_t>, int32_t>::Convert( 359 mojo::ConvertTo<std::vector<uint8_t>>(static_cast<int32_t>(
361 static_cast<int32_t>( 360 mojo::ConvertTo<mus::mojom::WindowType>(init_params.type)));
362 mojo::ConvertTo<mus::mojom::WindowType>(init_params.type)));
363 (*properties)[mus::mojom::WindowManager::kResizeBehavior_Property] = 361 (*properties)[mus::mojom::WindowManager::kResizeBehavior_Property] =
364 mojo::TypeConverter<const std::vector<uint8_t>, int32_t>::Convert( 362 mojo::ConvertTo<std::vector<uint8_t>>(
365 ResizeBehaviorFromDelegate(init_params.delegate)); 363 ResizeBehaviorFromDelegate(init_params.delegate));
366 SkBitmap app_icon = AppIconFromDelegate(init_params.delegate); 364 SkBitmap app_icon = AppIconFromDelegate(init_params.delegate);
367 if (!app_icon.isNull()) { 365 if (!app_icon.isNull()) {
368 (*properties)[mus::mojom::WindowManager::kWindowAppIcon_Property] = 366 (*properties)[mus::mojom::WindowManager::kWindowAppIcon_Property] =
369 mojo::TypeConverter<const std::vector<uint8_t>, SkBitmap>::Convert( 367 mojo::ConvertTo<std::vector<uint8_t>>(app_icon);
370 app_icon);
371 } 368 }
372 } 369 }
373 370
374 //////////////////////////////////////////////////////////////////////////////// 371 ////////////////////////////////////////////////////////////////////////////////
375 // NativeWidgetMus, internal::NativeWidgetPrivate implementation: 372 // NativeWidgetMus, internal::NativeWidgetPrivate implementation:
376 373
377 NonClientFrameView* NativeWidgetMus::CreateNonClientFrameView() { 374 NonClientFrameView* NativeWidgetMus::CreateNonClientFrameView() {
378 return new ClientSideNonClientFrameView(GetWidget()); 375 return new ClientSideNonClientFrameView(GetWidget());
379 } 376 }
380 377
(...skipping 624 matching lines...) Expand 10 before | Expand all | Expand 10 after
1005 window_tree_host_->Show(); 1002 window_tree_host_->Show();
1006 GetNativeWindow()->Show(); 1003 GetNativeWindow()->Show();
1007 } else { 1004 } else {
1008 window_tree_host_->Hide(); 1005 window_tree_host_->Hide();
1009 GetNativeWindow()->Hide(); 1006 GetNativeWindow()->Hide();
1010 } 1007 }
1011 native_widget_delegate_->OnNativeWidgetVisibilityChanged(window->visible()); 1008 native_widget_delegate_->OnNativeWidgetVisibilityChanged(window->visible());
1012 } 1009 }
1013 1010
1014 } // namespace views 1011 } // namespace views
OLDNEW
« no previous file with comments | « mash/wm/user_window_controller_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698