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

Unified Diff: ash/wm/caption_buttons/frame_maximize_button.cc

Issue 59043013: Add flag to enable immersive fullscreen for v2 apps (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 1 month 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
Index: ash/wm/caption_buttons/frame_maximize_button.cc
diff --git a/ash/wm/caption_buttons/frame_maximize_button.cc b/ash/wm/caption_buttons/frame_maximize_button.cc
index 81995c299866aaacdd208bc2f72dfe6eab4d5eb8..14526a01360ce1f43908bdbf9135ec830830f44e 100644
--- a/ash/wm/caption_buttons/frame_maximize_button.cc
+++ b/ash/wm/caption_buttons/frame_maximize_button.cc
@@ -10,6 +10,7 @@
#include "ash/shell.h"
#include "ash/shell_delegate.h"
#include "ash/touch/touch_uma.h"
+#include "ash/wm/caption_buttons/frame_maximize_button_observer.h"
#include "ash/wm/caption_buttons/maximize_bubble_controller.h"
#include "ash/wm/window_animations.h"
#include "ash/wm/window_state.h"
@@ -101,6 +102,15 @@ FrameMaximizeButton::~FrameMaximizeButton() {
OnWindowDestroying(frame_->GetNativeWindow());
}
+void FrameMaximizeButton::AddObserver(FrameMaximizeButtonObserver* observer) {
+ observer_list_.AddObserver(observer);
+}
+
+void FrameMaximizeButton::RemoveObserver(
+ FrameMaximizeButtonObserver* observer) {
+ observer_list_.RemoveObserver(observer);
+}
+
void FrameMaximizeButton::SnapButtonHovered(SnapType type) {
// Make sure to only show hover operations when no button is pressed and
// a similar snap operation in progress does not get re-applied.
@@ -157,6 +167,12 @@ void FrameMaximizeButton::ExecuteSnapAndCloseMenu(SnapType snap_type) {
Snap(snap_sizer.get());
}
+void FrameMaximizeButton::OnMaximizeBubbleShown(views::Widget* bubble) {
+ FOR_EACH_OBSERVER(FrameMaximizeButtonObserver,
+ observer_list_,
+ OnMaximizeBubbleShown(bubble));
+}
+
void FrameMaximizeButton::DestroyMaximizeMenu() {
Cancel(false);
}
« no previous file with comments | « ash/wm/caption_buttons/frame_maximize_button.h ('k') | ash/wm/caption_buttons/frame_maximize_button_observer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698