Index: ash/mus/non_client_frame_controller.cc |
diff --git a/mash/wm/non_client_frame_controller.cc b/ash/mus/non_client_frame_controller.cc |
similarity index 86% |
rename from mash/wm/non_client_frame_controller.cc |
rename to ash/mus/non_client_frame_controller.cc |
index 06900f2fa54e40ddbf59ab809fad07a42ba44e77..dbd8a8269284ed50bae61e6011f2ec42abe80af7 100644 |
--- a/mash/wm/non_client_frame_controller.cc |
+++ b/ash/mus/non_client_frame_controller.cc |
@@ -2,7 +2,7 @@ |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
-#include "mash/wm/non_client_frame_controller.h" |
+#include "ash/mus/non_client_frame_controller.h" |
#include <stdint.h> |
@@ -10,6 +10,12 @@ |
#include <string> |
#include <vector> |
+#include "ash/mus/bridge/wm_window_mus.h" |
+#include "ash/mus/frame/frame_border_hit_test_controller.h" |
+#include "ash/mus/frame/move_event_handler.h" |
+#include "ash/mus/frame/non_client_frame_view_mash.h" |
+#include "ash/mus/property_util.h" |
+#include "ash/mus/shadow.h" |
#include "base/macros.h" |
#include "base/strings/utf_string_conversions.h" |
#include "components/mus/public/cpp/property_type_converters.h" |
@@ -18,12 +24,6 @@ |
#include "components/mus/public/cpp/window_property.h" |
#include "components/mus/public/interfaces/window_manager.mojom.h" |
#include "components/mus/public/interfaces/window_tree_host.mojom.h" |
-#include "mash/wm/bridge/wm_window_mus.h" |
-#include "mash/wm/frame/frame_border_hit_test_controller.h" |
-#include "mash/wm/frame/move_event_handler.h" |
-#include "mash/wm/frame/non_client_frame_view_mash.h" |
-#include "mash/wm/property_util.h" |
-#include "mash/wm/shadow.h" |
#include "ui/aura/layout_manager.h" |
#include "ui/aura/window.h" |
#include "ui/aura/window_tree_host.h" |
@@ -32,8 +32,8 @@ |
#include "ui/views/mus/native_widget_mus.h" |
#include "ui/views/widget/widget.h" |
-namespace mash { |
-namespace wm { |
+namespace ash { |
+namespace mus { |
namespace { |
// LayoutManager associated with the window created by WindowTreeHost. Resizes |
@@ -88,15 +88,14 @@ class WmNativeWidgetMus : public views::NativeWidgetMus { |
public: |
WmNativeWidgetMus(views::internal::NativeWidgetDelegate* delegate, |
shell::Connector* connector, |
- mus::Window* window, |
- mus::WindowManagerClient* window_manager_client) |
+ ::mus::Window* window, |
+ ::mus::WindowManagerClient* window_manager_client) |
: NativeWidgetMus(delegate, |
connector, |
window, |
- mus::mojom::SurfaceType::UNDERLAY), |
+ ::mus::mojom::SurfaceType::UNDERLAY), |
window_manager_client_(window_manager_client) {} |
- ~WmNativeWidgetMus() override { |
- } |
+ ~WmNativeWidgetMus() override {} |
// NativeWidgetMus: |
views::NonClientFrameView* CreateNonClientFrameView() override { |
@@ -146,7 +145,7 @@ class WmNativeWidgetMus : public views::NativeWidgetMus { |
std::unique_ptr<MoveEventHandler> move_event_handler_; |
- mus::WindowManagerClient* window_manager_client_; |
+ ::mus::WindowManagerClient* window_manager_client_; |
DISALLOW_COPY_AND_ASSIGN(WmNativeWidgetMus); |
}; |
@@ -180,9 +179,9 @@ class ClientViewMus : public views::ClientView { |
// static |
void NonClientFrameController::Create( |
shell::Connector* connector, |
- mus::Window* parent, |
- mus::Window* window, |
- mus::WindowManagerClient* window_manager_client) { |
+ ::mus::Window* parent, |
+ ::mus::Window* window, |
+ ::mus::WindowManagerClient* window_manager_client) { |
new NonClientFrameController(connector, parent, window, |
window_manager_client); |
} |
@@ -199,9 +198,9 @@ int NonClientFrameController::GetMaxTitleBarButtonWidth() { |
NonClientFrameController::NonClientFrameController( |
shell::Connector* connector, |
- mus::Window* parent, |
- mus::Window* window, |
- mus::WindowManagerClient* window_manager_client) |
+ ::mus::Window* parent, |
+ ::mus::Window* window, |
+ ::mus::WindowManagerClient* window_manager_client) |
: widget_(new views::Widget), window_(window) { |
WmWindowMus* wm_window = WmWindowMus::Get(window); |
wm_window->set_widget(widget_, WmWindowMus::WidgetCreationType::FOR_CLIENT); |
@@ -240,12 +239,12 @@ NonClientFrameController::~NonClientFrameController() { |
base::string16 NonClientFrameController::GetWindowTitle() const { |
if (!window_->HasSharedProperty( |
- mus::mojom::WindowManager::kWindowTitle_Property)) { |
+ ::mus::mojom::WindowManager::kWindowTitle_Property)) { |
return base::string16(); |
} |
base::string16 title = window_->GetSharedProperty<base::string16>( |
- mus::mojom::WindowManager::kWindowTitle_Property); |
+ ::mus::mojom::WindowManager::kWindowTitle_Property); |
if (IsWindowJanky(window_)) |
title += base::ASCIIToUTF16(" !! Not responding !!"); |
@@ -259,20 +258,20 @@ views::View* NonClientFrameController::GetContentsView() { |
bool NonClientFrameController::CanResize() const { |
return window_ && |
- (GetResizeBehavior(window_) & mus::mojom::kResizeBehaviorCanResize) != |
- 0; |
+ (GetResizeBehavior(window_) & |
+ ::mus::mojom::kResizeBehaviorCanResize) != 0; |
} |
bool NonClientFrameController::CanMaximize() const { |
return window_ && |
(GetResizeBehavior(window_) & |
- mus::mojom::kResizeBehaviorCanMaximize) != 0; |
+ ::mus::mojom::kResizeBehaviorCanMaximize) != 0; |
} |
bool NonClientFrameController::CanMinimize() const { |
return window_ && |
(GetResizeBehavior(window_) & |
- mus::mojom::kResizeBehaviorCanMinimize) != 0; |
+ ::mus::mojom::kResizeBehaviorCanMinimize) != 0; |
} |
bool NonClientFrameController::ShouldShowWindowTitle() const { |
@@ -287,18 +286,18 @@ views::ClientView* NonClientFrameController::CreateClientView( |
} |
void NonClientFrameController::OnWindowSharedPropertyChanged( |
- mus::Window* window, |
+ ::mus::Window* window, |
const std::string& name, |
const std::vector<uint8_t>* old_data, |
const std::vector<uint8_t>* new_data) { |
- if (name == mus::mojom::WindowManager::kResizeBehavior_Property) |
+ if (name == ::mus::mojom::WindowManager::kResizeBehavior_Property) |
widget_->OnSizeConstraintsChanged(); |
- else if (name == mus::mojom::WindowManager::kWindowTitle_Property) |
+ else if (name == ::mus::mojom::WindowManager::kWindowTitle_Property) |
widget_->UpdateWindowTitle(); |
} |
void NonClientFrameController::OnWindowLocalPropertyChanged( |
- mus::Window* window, |
+ ::mus::Window* window, |
const void* key, |
intptr_t old) { |
if (IsWindowJankyProperty(key)) { |
@@ -307,10 +306,10 @@ void NonClientFrameController::OnWindowLocalPropertyChanged( |
} |
} |
-void NonClientFrameController::OnWindowDestroyed(mus::Window* window) { |
+void NonClientFrameController::OnWindowDestroyed(::mus::Window* window) { |
window_->RemoveObserver(this); |
window_ = nullptr; |
} |
-} // namespace wm |
-} // namespace mash |
+} // namespace mus |
+} // namespace ash |