Index: ash/mus/frame/non_client_frame_view_mash.cc |
diff --git a/mash/wm/frame/non_client_frame_view_mash.cc b/ash/mus/frame/non_client_frame_view_mash.cc |
similarity index 90% |
rename from mash/wm/frame/non_client_frame_view_mash.cc |
rename to ash/mus/frame/non_client_frame_view_mash.cc |
index 86717f29dc397fcfc9a5b358fae283ebab06d537..5a9b69e8535cbc66268efd2d5ab949648e31307b 100644 |
--- a/mash/wm/frame/non_client_frame_view_mash.cc |
+++ b/ash/mus/frame/non_client_frame_view_mash.cc |
@@ -2,20 +2,20 @@ |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
-#include "mash/wm/frame/non_client_frame_view_mash.h" |
+#include "ash/mus/frame/non_client_frame_view_mash.h" |
#include <algorithm> |
#include <memory> |
#include <vector> |
+#include "ash/mus/frame/caption_buttons/frame_caption_button_container_view.h" |
+#include "ash/mus/frame/default_header_painter.h" |
+#include "ash/mus/frame/frame_border_hit_test_controller.h" |
+#include "ash/mus/frame/header_painter.h" |
#include "base/macros.h" |
#include "components/mus/public/cpp/window.h" |
#include "components/mus/public/cpp/window_tree_client.h" |
-#include "grit/mash_wm_resources.h" |
-#include "mash/wm/frame/caption_buttons/frame_caption_button_container_view.h" |
-#include "mash/wm/frame/default_header_painter.h" |
-#include "mash/wm/frame/frame_border_hit_test_controller.h" |
-#include "mash/wm/frame/header_painter.h" |
+#include "grit/ash_mus_resources.h" |
#include "ui/base/resource/resource_bundle.h" |
#include "ui/compositor/paint_recorder.h" |
#include "ui/events/mojo/input_events_type_converters.h" |
@@ -28,8 +28,8 @@ |
#include "ui/views/widget/widget.h" |
#include "ui/views/widget/widget_delegate.h" |
-namespace mash { |
-namespace wm { |
+namespace ash { |
+namespace mus { |
/////////////////////////////////////////////////////////////////////////////// |
// NonClientFrameViewMash::HeaderView |
@@ -38,7 +38,7 @@ namespace wm { |
class NonClientFrameViewMash::HeaderView : public views::View { |
public: |
// |frame| is the widget that the caption buttons act on. |
- HeaderView(views::Widget* frame, mus::Window* window); |
+ HeaderView(views::Widget* frame, ::mus::Window* window); |
~HeaderView() override; |
// Schedules a repaint for the entire title. |
@@ -76,13 +76,13 @@ class NonClientFrameViewMash::HeaderView : public views::View { |
// View which contains the window caption buttons. |
FrameCaptionButtonContainerView* caption_button_container_; |
- mus::Window* window_; |
+ ::mus::Window* window_; |
DISALLOW_COPY_AND_ASSIGN(HeaderView); |
}; |
NonClientFrameViewMash::HeaderView::HeaderView(views::Widget* frame, |
- mus::Window* window) |
+ ::mus::Window* window) |
: frame_(frame), |
header_painter_(new DefaultHeaderPainter), |
caption_button_container_(nullptr), |
@@ -132,7 +132,7 @@ void NonClientFrameViewMash::HeaderView::Layout() { |
} |
void NonClientFrameViewMash::HeaderView::OnPaint(gfx::Canvas* canvas) { |
- const mus::Window* focused_window = |
+ const ::mus::Window* focused_window = |
window_->window_tree()->GetFocusedWindow(); |
const bool paint_as_active = |
focused_window && window_->Contains(focused_window); |
@@ -162,7 +162,7 @@ void NonClientFrameViewMash::HeaderView::ChildPreferredSizeChanged( |
const char NonClientFrameViewMash::kViewClassName[] = "NonClientFrameViewMash"; |
NonClientFrameViewMash::NonClientFrameViewMash(views::Widget* frame, |
- mus::Window* window) |
+ ::mus::Window* window) |
: frame_(frame), |
window_(window), |
header_view_(new HeaderView(frame, window)) { |
@@ -181,7 +181,7 @@ NonClientFrameViewMash::~NonClientFrameViewMash() { |
gfx::Insets NonClientFrameViewMash::GetPreferredClientAreaInsets() { |
ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); |
const int header_height = |
- rb.GetImageSkiaNamed(IDR_MASH_WM_WINDOW_CONTROL_BACKGROUND_P) |
+ rb.GetImageSkiaNamed(IDR_ASH_MUS_WINDOW_CONTROL_BACKGROUND_P) |
->size() |
.height(); |
return gfx::Insets(header_height, 0, 0, 0); |
@@ -190,7 +190,7 @@ gfx::Insets NonClientFrameViewMash::GetPreferredClientAreaInsets() { |
// static |
int NonClientFrameViewMash::GetMaxTitleBarButtonWidth() { |
ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); |
- return rb.GetImageSkiaNamed(IDR_MASH_WM_WINDOW_CONTROL_BACKGROUND_P) |
+ return rb.GetImageSkiaNamed(IDR_ASH_MUS_WINDOW_CONTROL_BACKGROUND_P) |
->size() |
.width() * |
3; |
@@ -308,7 +308,7 @@ void NonClientFrameViewMash::PaintChildren(const ui::PaintContext& context) { |
} |
void NonClientFrameViewMash::OnWindowClientAreaChanged( |
- mus::Window* window, |
+ ::mus::Window* window, |
const gfx::Insets& old_client_area, |
const std::vector<gfx::Rect>& old_additional_client_area) { |
// Only the insets effect the rendering. |
@@ -323,18 +323,18 @@ void NonClientFrameViewMash::OnWindowClientAreaChanged( |
SchedulePaint(); |
} |
-void NonClientFrameViewMash::OnWindowDestroyed(mus::Window* window) { |
+void NonClientFrameViewMash::OnWindowDestroyed(::mus::Window* window) { |
RemoveObservers(); |
} |
void NonClientFrameViewMash::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) |
header_view_->SizeConstraintsChanged(); |
- else if (name == mus::mojom::WindowManager::kWindowTitle_Property) |
+ else if (name == ::mus::mojom::WindowManager::kWindowTitle_Property) |
header_view_->SchedulePaintForTitle(); |
} |
@@ -358,13 +358,14 @@ void NonClientFrameViewMash::RemoveObservers() { |
window_ = nullptr; |
} |
-void NonClientFrameViewMash::OnWindowTreeFocusChanged(mus::Window* gained_focus, |
- mus::Window* lost_focus) { |
+void NonClientFrameViewMash::OnWindowTreeFocusChanged( |
+ ::mus::Window* gained_focus, |
+ ::mus::Window* lost_focus) { |
const bool had_focus = lost_focus && window_->Contains(lost_focus); |
const bool has_focus = gained_focus && window_->Contains(gained_focus); |
if (had_focus != has_focus) |
SchedulePaint(); |
} |
-} // namespace wm |
-} // namespace mash |
+} // namespace mus |
+} // namespace ash |