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

Side by Side Diff: mandoline/ui/desktop_ui/browser_window.cc

Issue 1459463004: mus: Allow the WM to specify the windows that can have active children. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: tot-merge Created 5 years 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 | « components/mus/ws/window_tree_unittest.cc ('k') | mash/wm/window_manager_application.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 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 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 root_ = root; 193 root_ = root;
194 194
195 host_->SetTitle("Mandoline"); 195 host_->SetTitle("Mandoline");
196 196
197 content_ = root_->connection()->NewWindow(); 197 content_ = root_->connection()->NewWindow();
198 Init(root_); 198 Init(root_);
199 199
200 host_->SetSize(mojo::Size::From(gfx::Size(1280, 800))); 200 host_->SetSize(mojo::Size::From(gfx::Size(1280, 800)));
201 201
202 root_->AddChild(content_); 202 root_->AddChild(content_);
203 host_->AddActivationParent(root_->id());
203 content_->SetVisible(true); 204 content_->SetVisible(true);
204 205
205 web_view_.Init(app_, content_); 206 web_view_.Init(app_, content_);
206 207
207 host_->AddAccelerator( 208 host_->AddAccelerator(
208 static_cast<uint32_t>(BrowserCommand::CLOSE), 209 static_cast<uint32_t>(BrowserCommand::CLOSE),
209 mus::CreateKeyMatcher(mus::mojom::KEYBOARD_CODE_W, 210 mus::CreateKeyMatcher(mus::mojom::KEYBOARD_CODE_W,
210 mus::mojom::EVENT_FLAGS_CONTROL_DOWN)); 211 mus::mojom::EVENT_FLAGS_CONTROL_DOWN));
211 host_->AddAccelerator( 212 host_->AddAccelerator(
212 static_cast<uint32_t>(BrowserCommand::FOCUS_OMNIBOX), 213 static_cast<uint32_t>(BrowserCommand::FOCUS_OMNIBOX),
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after
441 content_bounds.set_width(DIPSToPixels(progress_bar_bounds.width())); 442 content_bounds.set_width(DIPSToPixels(progress_bar_bounds.width()));
442 content_bounds.set_height(host->bounds().height() - content_bounds.y() - 443 content_bounds.set_height(host->bounds().height() - content_bounds.y() -
443 DIPSToPixels(10)); 444 DIPSToPixels(10));
444 content_->SetBounds(content_bounds); 445 content_->SetBounds(content_bounds);
445 446
446 // The omnibox view bounds are in physical pixels. 447 // The omnibox view bounds are in physical pixels.
447 omnibox_view_->SetBounds(bounds_in_physical_pixels); 448 omnibox_view_->SetBounds(bounds_in_physical_pixels);
448 } 449 }
449 450
450 } // namespace mandoline 451 } // namespace mandoline
OLDNEW
« no previous file with comments | « components/mus/ws/window_tree_unittest.cc ('k') | mash/wm/window_manager_application.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698