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

Side by Side Diff: chrome/browser/ui/views/apps/chrome_native_app_window_views_aura.cc

Issue 2625113004: Unify window fullscreen and minimizing implementation (Closed)
Patch Set: Update Created 3 years, 11 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "chrome/browser/ui/views/apps/chrome_native_app_window_views_aura.h" 5 #include "chrome/browser/ui/views/apps/chrome_native_app_window_views_aura.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "apps/ui/views/app_window_frame_view.h" 9 #include "apps/ui/views/app_window_frame_view.h"
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 28 matching lines...) Expand all
39 switch (restore_state) { 39 switch (restore_state) {
40 case ui::SHOW_STATE_NORMAL: 40 case ui::SHOW_STATE_NORMAL:
41 case ui::SHOW_STATE_MAXIMIZED: 41 case ui::SHOW_STATE_MAXIMIZED:
42 case ui::SHOW_STATE_FULLSCREEN: 42 case ui::SHOW_STATE_FULLSCREEN:
43 return restore_state; 43 return restore_state;
44 44
45 case ui::SHOW_STATE_DEFAULT: 45 case ui::SHOW_STATE_DEFAULT:
46 case ui::SHOW_STATE_MINIMIZED: 46 case ui::SHOW_STATE_MINIMIZED:
47 case ui::SHOW_STATE_INACTIVE: 47 case ui::SHOW_STATE_INACTIVE:
48 case ui::SHOW_STATE_DOCKED: 48 case ui::SHOW_STATE_DOCKED:
49 case ui::SHOW_STATE_PREVIOUS:
49 case ui::SHOW_STATE_END: 50 case ui::SHOW_STATE_END:
50 return ui::SHOW_STATE_NORMAL; 51 return ui::SHOW_STATE_NORMAL;
51 } 52 }
52 53
53 return ui::SHOW_STATE_NORMAL; 54 return ui::SHOW_STATE_NORMAL;
54 } 55 }
55 56
56 void ChromeNativeAppWindowViewsAura::OnBeforeWidgetInit( 57 void ChromeNativeAppWindowViewsAura::OnBeforeWidgetInit(
57 const AppWindow::CreateParams& create_params, 58 const AppWindow::CreateParams& create_params,
58 views::Widget::InitParams* init_params, 59 views::Widget::InitParams* init_params,
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 ChromeNativeAppWindowViews::UpdateShape(std::move(region)); 126 ChromeNativeAppWindowViews::UpdateShape(std::move(region));
126 127
127 aura::Window* native_window = widget()->GetNativeWindow(); 128 aura::Window* native_window = widget()->GetNativeWindow();
128 if (shape() && !had_shape) { 129 if (shape() && !had_shape) {
129 native_window->SetEventTargeter(std::unique_ptr<ui::EventTargeter>( 130 native_window->SetEventTargeter(std::unique_ptr<ui::EventTargeter>(
130 new ShapedAppWindowTargeter(native_window, this))); 131 new ShapedAppWindowTargeter(native_window, this)));
131 } else if (!shape() && had_shape) { 132 } else if (!shape() && had_shape) {
132 native_window->SetEventTargeter(std::unique_ptr<ui::EventTargeter>()); 133 native_window->SetEventTargeter(std::unique_ptr<ui::EventTargeter>());
133 } 134 }
134 } 135 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698