Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(51)

Unified Diff: ui/views/mus/native_widget_mus.cc

Issue 2387013003: Adds OnChildWindowVisibilityChanged to ui::WindowObserver (Closed)
Patch Set: merge Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/views/mus/native_widget_mus.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/mus/native_widget_mus.cc
diff --git a/ui/views/mus/native_widget_mus.cc b/ui/views/mus/native_widget_mus.cc
index 1299e5bd6c6635f669fd3529b492f16e953693ff..5cec6d9c8f8361e8bee1669240b7de1294213754 100644
--- a/ui/views/mus/native_widget_mus.cc
+++ b/ui/views/mus/native_widget_mus.cc
@@ -2,6 +2,10 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+// This has to be before any other includes, else default is picked up.
+// See base/logging for details on this.
+#define NOTIMPLEMENTED_POLICY 5
+
#include "ui/views/mus/native_widget_mus.h"
#include <utility>
@@ -412,11 +416,11 @@ class NativeWidgetMus::MusWindowObserver : public ui::WindowObserver {
}
// ui::WindowObserver:
- void OnWindowVisibilityChanging(ui::Window* window) override {
- native_widget_mus_->OnMusWindowVisibilityChanging(window);
+ void OnWindowVisibilityChanging(ui::Window* window, bool visible) override {
+ native_widget_mus_->OnMusWindowVisibilityChanging(window, visible);
}
- void OnWindowVisibilityChanged(ui::Window* window) override {
- native_widget_mus_->OnMusWindowVisibilityChanged(window);
+ void OnWindowVisibilityChanged(ui::Window* window, bool visible) override {
+ native_widget_mus_->OnMusWindowVisibilityChanged(window, visible);
}
void OnWindowPredefinedCursorChanged(ui::Window* window,
ui::mojom::Cursor cursor) override {
@@ -796,17 +800,17 @@ void NativeWidgetMus::OnWidgetInitDone() {
}
bool NativeWidgetMus::ShouldUseNativeFrame() const {
- // NOTIMPLEMENTED();
+ NOTIMPLEMENTED();
return false;
}
bool NativeWidgetMus::ShouldWindowContentsBeTransparent() const {
- // NOTIMPLEMENTED();
+ NOTIMPLEMENTED();
return true;
}
void NativeWidgetMus::FrameTypeChanged() {
- // NOTIMPLEMENTED();
+ NOTIMPLEMENTED();
}
Widget* NativeWidgetMus::GetWidget() {
@@ -838,11 +842,11 @@ const ui::Layer* NativeWidgetMus::GetLayer() const {
}
void NativeWidgetMus::ReorderNativeViews() {
- // NOTIMPLEMENTED();
+ NOTIMPLEMENTED();
}
void NativeWidgetMus::ViewRemoved(View* view) {
- // NOTIMPLEMENTED();
+ NOTIMPLEMENTED();
}
// These methods are wrong in mojo. They're not usually used to associate
@@ -901,7 +905,7 @@ void NativeWidgetMus::CenterWindow(const gfx::Size& size) {
void NativeWidgetMus::GetWindowPlacement(
gfx::Rect* bounds,
ui::WindowShowState* maximized) const {
- // NOTIMPLEMENTED();
+ NOTIMPLEMENTED();
}
bool NativeWidgetMus::SetWindowTitle(const base::string16& title) {
@@ -1019,19 +1023,19 @@ void NativeWidgetMus::SetSize(const gfx::Size& size) {
}
void NativeWidgetMus::StackAbove(gfx::NativeView native_view) {
- // NOTIMPLEMENTED();
+ NOTIMPLEMENTED();
}
void NativeWidgetMus::StackAtTop() {
- // NOTIMPLEMENTED();
+ NOTIMPLEMENTED();
}
void NativeWidgetMus::StackBelow(gfx::NativeView native_view) {
- // NOTIMPLEMENTED();
+ NOTIMPLEMENTED();
}
void NativeWidgetMus::SetShape(std::unique_ptr<SkRegion> shape) {
- // NOTIMPLEMENTED();
+ NOTIMPLEMENTED();
}
void NativeWidgetMus::Close() {
@@ -1208,7 +1212,7 @@ void NativeWidgetMus::SetOpacity(float opacity) {
}
void NativeWidgetMus::FlashFrame(bool flash_frame) {
- // NOTIMPLEMENTED();
+ NOTIMPLEMENTED();
}
void NativeWidgetMus::RunShellDrag(View* view,
@@ -1241,7 +1245,7 @@ void NativeWidgetMus::SetCursor(gfx::NativeCursor cursor) {
}
bool NativeWidgetMus::IsMouseEventsEnabled() const {
- // NOTIMPLEMENTED();
+ NOTIMPLEMENTED();
return true;
}
@@ -1259,7 +1263,7 @@ void NativeWidgetMus::ClearNativeFocus() {
}
gfx::Rect NativeWidgetMus::GetWorkAreaBoundsInScreen() const {
- // NOTIMPLEMENTED();
+ NOTIMPLEMENTED();
return gfx::Rect();
}
@@ -1295,17 +1299,17 @@ void NativeWidgetMus::EndMoveLoop() {
}
void NativeWidgetMus::SetVisibilityChangedAnimationsEnabled(bool value) {
- // NOTIMPLEMENTED();
+ NOTIMPLEMENTED();
}
void NativeWidgetMus::SetVisibilityAnimationDuration(
const base::TimeDelta& duration) {
- // NOTIMPLEMENTED();
+ NOTIMPLEMENTED();
}
void NativeWidgetMus::SetVisibilityAnimationTransition(
Widget::VisibilityTransition transition) {
- // NOTIMPLEMENTED();
+ NOTIMPLEMENTED();
}
ui::NativeTheme* NativeWidgetMus::GetNativeTheme() const {
@@ -1313,11 +1317,11 @@ ui::NativeTheme* NativeWidgetMus::GetNativeTheme() const {
}
void NativeWidgetMus::OnRootViewLayout() {
- // NOTIMPLEMENTED();
+ NOTIMPLEMENTED();
}
bool NativeWidgetMus::IsTranslucentWindowOpacitySupported() const {
- // NOTIMPLEMENTED();
+ NOTIMPLEMENTED();
return true;
}
@@ -1331,7 +1335,7 @@ void NativeWidgetMus::OnSizeConstraintsChanged() {
}
void NativeWidgetMus::RepostNativeEvent(gfx::NativeEvent native_event) {
- // NOTIMPLEMENTED();
+ NOTIMPLEMENTED();
}
std::string NativeWidgetMus::GetName() const {
@@ -1522,25 +1526,25 @@ void NativeWidgetMus::OnWindowInputEvent(
// |ack_handler| acks the event on destruction if necessary.
}
-void NativeWidgetMus::OnMusWindowVisibilityChanging(ui::Window* window) {
- if (window == window_) {
- native_widget_delegate_->OnNativeWidgetVisibilityChanging(
- !window->visible());
- }
+void NativeWidgetMus::OnMusWindowVisibilityChanging(ui::Window* window,
+ bool visible) {
+ if (window == window_)
+ native_widget_delegate_->OnNativeWidgetVisibilityChanging(visible);
}
-void NativeWidgetMus::OnMusWindowVisibilityChanged(ui::Window* window) {
+void NativeWidgetMus::OnMusWindowVisibilityChanged(ui::Window* window,
+ bool visible) {
if (window != window_)
return;
- if (window->visible()) {
+ if (visible) {
window_tree_host_->Show();
GetNativeWindow()->Show();
} else {
window_tree_host_->Hide();
GetNativeWindow()->Hide();
}
- native_widget_delegate_->OnNativeWidgetVisibilityChanged(window->visible());
+ native_widget_delegate_->OnNativeWidgetVisibilityChanged(visible);
}
void NativeWidgetMus::UpdateHitTestMask() {
« no previous file with comments | « ui/views/mus/native_widget_mus.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698