OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 <stdio.h> | 5 #include <stdio.h> |
6 #include <string> | 6 #include <string> |
7 | 7 |
8 #include "base/at_exit.h" | 8 #include "base/at_exit.h" |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
143 class LauncherController : public views::TextfieldController { | 143 class LauncherController : public views::TextfieldController { |
144 public: | 144 public: |
145 explicit LauncherController(URLReceiver* url_receiver) | 145 explicit LauncherController(URLReceiver* url_receiver) |
146 : url_receiver_(url_receiver) {} | 146 : url_receiver_(url_receiver) {} |
147 | 147 |
148 void InitInWindow(aura::Window* parent) { | 148 void InitInWindow(aura::Window* parent) { |
149 views::Widget* widget = new views::Widget; | 149 views::Widget* widget = new views::Widget; |
150 views::Widget::InitParams params(views::Widget::InitParams::TYPE_POPUP); | 150 views::Widget::InitParams params(views::Widget::InitParams::TYPE_POPUP); |
151 params.parent = parent; | 151 params.parent = parent; |
152 params.bounds = parent->bounds(); | 152 params.bounds = parent->bounds(); |
153 params.can_activate = true; | 153 params.activatable = views::Widget::InitParams::ACTIVATABLE_YES; |
154 widget->Init(params); | 154 widget->Init(params); |
155 | 155 |
156 views::View* container = new views::View; | 156 views::View* container = new views::View; |
157 container->set_background( | 157 container->set_background( |
158 views::Background::CreateSolidBackground(SK_ColorYELLOW)); | 158 views::Background::CreateSolidBackground(SK_ColorYELLOW)); |
159 container->SetBorder( | 159 container->SetBorder( |
160 views::Border::CreateEmptyBorder(10, 10, 10, 10)); | 160 views::Border::CreateEmptyBorder(10, 10, 10, 10)); |
161 container->SetLayoutManager(new views::FillLayout); | 161 container->SetLayoutManager(new views::FillLayout); |
162 widget->SetContentsView(container); | 162 widget->SetContentsView(container); |
163 | 163 |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
286 // Aura that doesn't define platform-specific stuff. | 286 // Aura that doesn't define platform-specific stuff. |
287 aura::Env::CreateInstance(true); | 287 aura::Env::CreateInstance(true); |
288 | 288 |
289 mojo::Application app(shell_handle); | 289 mojo::Application app(shell_handle); |
290 app.AddServiceConnector( | 290 app.AddServiceConnector( |
291 new mojo::ServiceConnector<mojo::examples::LauncherImpl>()); | 291 new mojo::ServiceConnector<mojo::examples::LauncherImpl>()); |
292 | 292 |
293 loop.Run(); | 293 loop.Run(); |
294 return MOJO_RESULT_OK; | 294 return MOJO_RESULT_OK; |
295 } | 295 } |
OLD | NEW |