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 "mandoline/ui/desktop_ui/browser_window.h" | 5 #include "mandoline/ui/desktop_ui/browser_window.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/strings/string16.h" | 8 #include "base/strings/string16.h" |
9 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
10 #include "base/time/time.h" | 10 #include "base/time/time.h" |
(...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
365 find_bar_view_->Hide(); | 365 find_bar_view_->Hide(); |
366 web_view_.web_view()->StopFinding(); | 366 web_view_.web_view()->StopFinding(); |
367 } | 367 } |
368 | 368 |
369 //////////////////////////////////////////////////////////////////////////////// | 369 //////////////////////////////////////////////////////////////////////////////// |
370 // BrowserWindow, private: | 370 // BrowserWindow, private: |
371 | 371 |
372 void BrowserWindow::Init(mus::View* root) { | 372 void BrowserWindow::Init(mus::View* root) { |
373 DCHECK_GT(root->viewport_metrics().device_pixel_ratio, 0); | 373 DCHECK_GT(root->viewport_metrics().device_pixel_ratio, 0); |
374 if (!aura_init_) | 374 if (!aura_init_) |
375 aura_init_.reset( | 375 aura_init_.reset(new views::AuraInit(app_, "mandoline_ui.pak", root)); |
376 new views::AuraInit(root, app_->shell(), "mandoline_ui.pak")); | |
377 | 376 |
378 root_ = root; | 377 root_ = root; |
379 omnibox_view_ = root_->connection()->CreateView(); | 378 omnibox_view_ = root_->connection()->CreateView(); |
380 root_->AddChild(omnibox_view_); | 379 root_->AddChild(omnibox_view_); |
381 | 380 |
382 views::WidgetDelegateView* widget_delegate = new views::WidgetDelegateView; | 381 views::WidgetDelegateView* widget_delegate = new views::WidgetDelegateView; |
383 widget_delegate->GetContentsView()->set_background( | 382 widget_delegate->GetContentsView()->set_background( |
384 views::Background::CreateSolidBackground(0xFFDDDDDD)); | 383 views::Background::CreateSolidBackground(0xFFDDDDDD)); |
385 toolbar_view_ = new ToolbarView(this); | 384 toolbar_view_ = new ToolbarView(this); |
386 progress_bar_ = new ProgressView; | 385 progress_bar_ = new ProgressView; |
(...skipping 22 matching lines...) Expand all Loading... |
409 omnibox_view_->Embed(view_tree_client.Pass()); | 408 omnibox_view_->Embed(view_tree_client.Pass()); |
410 | 409 |
411 // TODO(beng): This should be handled sufficiently by | 410 // TODO(beng): This should be handled sufficiently by |
412 // OmniboxImpl::ShowWindow() but unfortunately view manager policy | 411 // OmniboxImpl::ShowWindow() but unfortunately view manager policy |
413 // currently prevents the embedded app from changing window z for | 412 // currently prevents the embedded app from changing window z for |
414 // its own window. | 413 // its own window. |
415 omnibox_view_->MoveToFront(); | 414 omnibox_view_->MoveToFront(); |
416 } | 415 } |
417 | 416 |
418 } // namespace mandoline | 417 } // namespace mandoline |
OLD | NEW |