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

Side by Side Diff: mandoline/ui/omnibox/omnibox_application.cc

Issue 1407073002: Adds GetDisplays() to WindowManager (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: merge 2 trunk Created 5 years, 2 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 | « mandoline/ui/desktop_ui/browser_window.cc ('k') | mojo/converters/network/BUILD.gn » ('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 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/omnibox/omnibox_application.h" 5 #include "mandoline/ui/omnibox/omnibox_application.h"
6 6
7 #include "base/strings/string16.h" 7 #include "base/strings/string16.h"
8 #include "base/strings/utf_string_conversions.h" 8 #include "base/strings/utf_string_conversions.h"
9 #include "components/mus/public/cpp/view.h" 9 #include "components/mus/public/cpp/view.h"
10 #include "components/mus/public/cpp/view_tree_connection.h" 10 #include "components/mus/public/cpp/view_tree_connection.h"
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 } 110 }
111 OmniboxImpl::~OmniboxImpl() {} 111 OmniboxImpl::~OmniboxImpl() {}
112 112
113 //////////////////////////////////////////////////////////////////////////////// 113 ////////////////////////////////////////////////////////////////////////////////
114 // OmniboxImpl, mus::ViewTreeDelegate implementation: 114 // OmniboxImpl, mus::ViewTreeDelegate implementation:
115 115
116 void OmniboxImpl::OnEmbed(mus::View* root) { 116 void OmniboxImpl::OnEmbed(mus::View* root) {
117 root_ = root; 117 root_ = root;
118 118
119 if (!aura_init_.get()) { 119 if (!aura_init_.get()) {
120 aura_init_.reset( 120 aura_init_.reset(new views::AuraInit(app_, "mandoline_ui.pak", root_));
121 new views::AuraInit(root, app_->shell(), "mandoline_ui.pak"));
122 edit_ = new views::Textfield; 121 edit_ = new views::Textfield;
123 edit_->set_controller(this); 122 edit_->set_controller(this);
124 edit_->SetTextInputType(ui::TEXT_INPUT_TYPE_URL); 123 edit_->SetTextInputType(ui::TEXT_INPUT_TYPE_URL);
125 } 124 }
126 125
127 const int kOpacity = 0xC0; 126 const int kOpacity = 0xC0;
128 views::WidgetDelegateView* widget_delegate = new views::WidgetDelegateView; 127 views::WidgetDelegateView* widget_delegate = new views::WidgetDelegateView;
129 widget_delegate->GetContentsView()->set_background( 128 widget_delegate->GetContentsView()->set_background(
130 views::Background::CreateSolidBackground( 129 views::Background::CreateSolidBackground(
131 SkColorSetA(0xDDDDDD, kOpacity))); 130 SkColorSetA(0xDDDDDD, kOpacity)));
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
220 edit_->SelectAll(false); 219 edit_->SelectAll(false);
221 edit_->RequestFocus(); 220 edit_->RequestFocus();
222 } 221 }
223 222
224 void OmniboxImpl::HideWindow() { 223 void OmniboxImpl::HideWindow() {
225 DCHECK(root_); 224 DCHECK(root_);
226 root_->SetVisible(false); 225 root_->SetVisible(false);
227 } 226 }
228 227
229 } // namespace mandoline 228 } // namespace mandoline
OLDNEW
« no previous file with comments | « mandoline/ui/desktop_ui/browser_window.cc ('k') | mojo/converters/network/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698