| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 "mash/quick_launch/quick_launch.h" | 5 #include "mash/quick_launch/quick_launch.h" |
| 6 | 6 |
| 7 #include "base/macros.h" | 7 #include "base/macros.h" |
| 8 #include "base/message_loop/message_loop.h" | 8 #include "base/message_loop/message_loop.h" |
| 9 #include "base/strings/string16.h" | 9 #include "base/strings/string16.h" |
| 10 #include "base/strings/string_util.h" | 10 #include "base/strings/string_util.h" |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 AddChildView(prompt_); | 46 AddChildView(prompt_); |
| 47 | 47 |
| 48 UpdateEntries(); | 48 UpdateEntries(); |
| 49 } | 49 } |
| 50 ~QuickLaunchUI() override { | 50 ~QuickLaunchUI() override { |
| 51 quick_launch_->RemoveWindow(GetWidget()); | 51 quick_launch_->RemoveWindow(GetWidget()); |
| 52 } | 52 } |
| 53 | 53 |
| 54 private: | 54 private: |
| 55 // Overridden from views::WidgetDelegate: | 55 // Overridden from views::WidgetDelegate: |
| 56 views::View* GetContentsView() override { return this; } | |
| 57 base::string16 GetWindowTitle() const override { | 56 base::string16 GetWindowTitle() const override { |
| 58 // TODO(beng): use resources. | 57 // TODO(beng): use resources. |
| 59 return base::ASCIIToUTF16("QuickLaunch"); | 58 return base::ASCIIToUTF16("QuickLaunch"); |
| 60 } | 59 } |
| 61 | 60 |
| 62 // Overridden from views::View: | 61 // Overridden from views::View: |
| 63 void Layout() override { | 62 void Layout() override { |
| 64 gfx::Rect bounds = GetLocalBounds(); | 63 gfx::Rect bounds = GetLocalBounds(); |
| 65 bounds.Inset(5, 5); | 64 bounds.Inset(5, 5); |
| 66 prompt_->SetBoundsRect(bounds); | 65 prompt_->SetBoundsRect(bounds); |
| (...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 197 windows_.push_back(window); | 196 windows_.push_back(window); |
| 198 } | 197 } |
| 199 | 198 |
| 200 void QuickLaunch::Create(const shell::Identity& remote_identity, | 199 void QuickLaunch::Create(const shell::Identity& remote_identity, |
| 201 mojom::LaunchableRequest request) { | 200 mojom::LaunchableRequest request) { |
| 202 bindings_.AddBinding(this, std::move(request)); | 201 bindings_.AddBinding(this, std::move(request)); |
| 203 } | 202 } |
| 204 | 203 |
| 205 } // namespace quick_launch | 204 } // namespace quick_launch |
| 206 } // namespace mash | 205 } // namespace mash |
| OLD | NEW |