| 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 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |