OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "examples/wm_flow/wm/frame_controller.h" | 5 #include "examples/wm_flow/wm/frame_controller.h" |
6 | 6 |
7 #include "base/macros.h" | 7 #include "base/macros.h" |
8 #include "base/strings/utf_string_conversions.h" | 8 #include "base/strings/utf_string_conversions.h" |
9 #include "mojo/converters/geometry/geometry_type_converters.h" | 9 #include "mojo/converters/geometry/geometry_type_converters.h" |
10 #include "mojo/public/interfaces/application/service_provider.mojom.h" | 10 #include "mojo/public/interfaces/application/service_provider.mojom.h" |
11 #include "mojo/services/view_manager/public/cpp/view.h" | 11 #include "mojo/services/view_manager/cpp/view.h" |
12 #include "mojo/services/view_manager/public/cpp/view_manager.h" | 12 #include "mojo/services/view_manager/cpp/view_manager.h" |
13 #include "services/window_manager/capture_controller.h" | 13 #include "services/window_manager/capture_controller.h" |
14 #include "services/window_manager/window_manager_root.h" | 14 #include "services/window_manager/window_manager_root.h" |
15 #include "url/gurl.h" | 15 #include "url/gurl.h" |
16 | 16 |
17 //////////////////////////////////////////////////////////////////////////////// | 17 //////////////////////////////////////////////////////////////////////////////// |
18 // FrameController, public: | 18 // FrameController, public: |
19 | 19 |
20 FrameController::FrameController( | 20 FrameController::FrameController( |
21 const GURL& frame_app_url, | 21 const GURL& frame_app_url, |
22 mojo::View* view, | 22 mojo::View* view, |
(...skipping 73 matching lines...) Loading... |
96 const int kTopControlsAdditionalInset = 15; | 96 const int kTopControlsAdditionalInset = 15; |
97 const int kDefaultInset = 25; | 97 const int kDefaultInset = 25; |
98 mojo::Rect bounds; | 98 mojo::Rect bounds; |
99 bounds.x = bounds.y = kDefaultInset; | 99 bounds.x = bounds.y = kDefaultInset; |
100 bounds.y += kTopControlsAdditionalInset; | 100 bounds.y += kTopControlsAdditionalInset; |
101 bounds.width = view_->bounds().width - kDefaultInset * 2; | 101 bounds.width = view_->bounds().width - kDefaultInset * 2; |
102 bounds.height = | 102 bounds.height = |
103 view_->bounds().height - kDefaultInset * 2 - kTopControlsAdditionalInset; | 103 view_->bounds().height - kDefaultInset * 2 - kTopControlsAdditionalInset; |
104 app_view_->SetBounds(bounds); | 104 app_view_->SetBounds(bounds); |
105 } | 105 } |
OLD | NEW |