OLD | NEW |
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 "mash/catalog_viewer/catalog_viewer.h" | 5 #include "mash/catalog_viewer/catalog_viewer.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 private: | 65 private: |
66 struct Entry { | 66 struct Entry { |
67 Entry(const std::string& name, const std::string& url) | 67 Entry(const std::string& name, const std::string& url) |
68 : name(name), url(url) {} | 68 : name(name), url(url) {} |
69 std::string name; | 69 std::string name; |
70 std::string url; | 70 std::string url; |
71 }; | 71 }; |
72 | 72 |
73 | 73 |
74 // Overridden from views::WidgetDelegate: | 74 // Overridden from views::WidgetDelegate: |
75 views::View* GetContentsView() override { return this; } | |
76 base::string16 GetWindowTitle() const override { | 75 base::string16 GetWindowTitle() const override { |
77 // TODO(beng): use resources. | 76 // TODO(beng): use resources. |
78 return base::ASCIIToUTF16("Applications"); | 77 return base::ASCIIToUTF16("Applications"); |
79 } | 78 } |
80 bool CanResize() const override { return true; } | 79 bool CanResize() const override { return true; } |
81 bool CanMaximize() const override { return true; } | 80 bool CanMaximize() const override { return true; } |
82 bool CanMinimize() const override { return true; } | 81 bool CanMinimize() const override { return true; } |
83 | 82 |
84 gfx::ImageSkia GetWindowAppIcon() override { | 83 gfx::ImageSkia GetWindowAppIcon() override { |
85 // TODO(jamescook): Create a new .pak file for this app and make a custom | 84 // TODO(jamescook): Create a new .pak file for this app and make a custom |
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
198 windows_.push_back(window); | 197 windows_.push_back(window); |
199 } | 198 } |
200 | 199 |
201 void CatalogViewer::Create(const shell::Identity& remote_identity, | 200 void CatalogViewer::Create(const shell::Identity& remote_identity, |
202 mojom::LaunchableRequest request) { | 201 mojom::LaunchableRequest request) { |
203 bindings_.AddBinding(this, std::move(request)); | 202 bindings_.AddBinding(this, std::move(request)); |
204 } | 203 } |
205 | 204 |
206 } // namespace catalog_viewer | 205 } // namespace catalog_viewer |
207 } // namespace mash | 206 } // namespace mash |
OLD | NEW |