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

Side by Side Diff: mash/wallpaper/wallpaper.cc

Issue 1527183003: Change mojo enums to be scoped enums in the generated C++ bindings. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@mojo-binding-equals
Patch Set: rebase Created 4 years, 11 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/shelf/shelf_application.cc ('k') | mash/wm/accelerator_registrar_apptest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "base/macros.h" 5 #include "base/macros.h"
6 #include "components/mus/public/cpp/property_type_converters.h" 6 #include "components/mus/public/cpp/property_type_converters.h"
7 #include "mash/wm/public/interfaces/container.mojom.h" 7 #include "mash/wm/public/interfaces/container.mojom.h"
8 #include "mojo/public/c/system/main.h" 8 #include "mojo/public/c/system/main.h"
9 #include "mojo/services/tracing/public/cpp/tracing_impl.h" 9 #include "mojo/services/tracing/public/cpp/tracing_impl.h"
10 #include "mojo/shell/public/cpp/application_connection.h" 10 #include "mojo/shell/public/cpp/application_connection.h"
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 views::WindowManagerConnection::Create(app); 51 views::WindowManagerConnection::Create(app);
52 52
53 views::Widget* widget = new views::Widget; 53 views::Widget* widget = new views::Widget;
54 views::Widget::InitParams params( 54 views::Widget::InitParams params(
55 views::Widget::InitParams::TYPE_WINDOW_FRAMELESS); 55 views::Widget::InitParams::TYPE_WINDOW_FRAMELESS);
56 params.delegate = new Wallpaper; 56 params.delegate = new Wallpaper;
57 57
58 std::map<std::string, std::vector<uint8_t>> properties; 58 std::map<std::string, std::vector<uint8_t>> properties;
59 properties[mash::wm::mojom::kWindowContainer_Property] = 59 properties[mash::wm::mojom::kWindowContainer_Property] =
60 mojo::TypeConverter<const std::vector<uint8_t>, int32_t>::Convert( 60 mojo::TypeConverter<const std::vector<uint8_t>, int32_t>::Convert(
61 mash::wm::mojom::CONTAINER_USER_BACKGROUND); 61 static_cast<int32_t>(mash::wm::mojom::Container::USER_BACKGROUND));
62 mus::Window* window = 62 mus::Window* window =
63 views::WindowManagerConnection::Get()->NewWindow(properties); 63 views::WindowManagerConnection::Get()->NewWindow(properties);
64 params.native_widget = new views::NativeWidgetMus( 64 params.native_widget = new views::NativeWidgetMus(
65 widget, app->shell(), window, mus::mojom::SURFACE_TYPE_DEFAULT); 65 widget, app->shell(), window, mus::mojom::SurfaceType::DEFAULT);
66 widget->Init(params); 66 widget->Init(params);
67 widget->Show(); 67 widget->Show();
68 } 68 }
69 69
70 mojo::TracingImpl tracing_; 70 mojo::TracingImpl tracing_;
71 scoped_ptr<views::AuraInit> aura_init_; 71 scoped_ptr<views::AuraInit> aura_init_;
72 72
73 DISALLOW_COPY_AND_ASSIGN(WallpaperApplicationDelegate); 73 DISALLOW_COPY_AND_ASSIGN(WallpaperApplicationDelegate);
74 }; 74 };
75 75
76 } // namespace 76 } // namespace
77 } // namespace wallpaper 77 } // namespace wallpaper
78 } // namespace mash 78 } // namespace mash
79 79
80 MojoResult MojoMain(MojoHandle shell_handle) { 80 MojoResult MojoMain(MojoHandle shell_handle) {
81 mojo::ApplicationRunner runner( 81 mojo::ApplicationRunner runner(
82 new mash::wallpaper::WallpaperApplicationDelegate); 82 new mash::wallpaper::WallpaperApplicationDelegate);
83 return runner.Run(shell_handle); 83 return runner.Run(shell_handle);
84 } 84 }
OLDNEW
« no previous file with comments | « mash/shelf/shelf_application.cc ('k') | mash/wm/accelerator_registrar_apptest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698