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

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

Issue 24108003: [Cleanup] Rename WindowSettings to WindowState (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase fix Created 7 years, 3 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/native_app_window_views.h" 5 #include "chrome/browser/ui/views/apps/native_app_window_views.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/file_util.h" 8 #include "base/file_util.h"
9 #include "base/path_service.h" 9 #include "base/path_service.h"
10 #include "base/threading/sequenced_worker_pool.h" 10 #include "base/threading/sequenced_worker_pool.h"
(...skipping 26 matching lines...) Expand all
37 37
38 #if defined(OS_LINUX) 38 #if defined(OS_LINUX)
39 #include "chrome/browser/shell_integration_linux.h" 39 #include "chrome/browser/shell_integration_linux.h"
40 #endif 40 #endif
41 41
42 #if defined(USE_ASH) 42 #if defined(USE_ASH)
43 #include "ash/screen_ash.h" 43 #include "ash/screen_ash.h"
44 #include "ash/shell.h" 44 #include "ash/shell.h"
45 #include "ash/wm/custom_frame_view_ash.h" 45 #include "ash/wm/custom_frame_view_ash.h"
46 #include "ash/wm/panels/panel_frame_view.h" 46 #include "ash/wm/panels/panel_frame_view.h"
47 #include "ash/wm/window_settings.h" 47 #include "ash/wm/window_state.h"
48 #include "chrome/browser/ui/ash/ash_util.h" 48 #include "chrome/browser/ui/ash/ash_util.h"
49 #include "ui/aura/client/aura_constants.h" 49 #include "ui/aura/client/aura_constants.h"
50 #include "ui/aura/root_window.h" 50 #include "ui/aura/root_window.h"
51 #include "ui/aura/window.h" 51 #include "ui/aura/window.h"
52 #endif 52 #endif
53 53
54 using apps::ShellWindow; 54 using apps::ShellWindow;
55 55
56 namespace { 56 namespace {
57 57
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after
278 window_->Init(params); 278 window_->Init(params);
279 window_->set_focus_on_creation(create_params.focused); 279 window_->set_focus_on_creation(create_params.focused);
280 280
281 #if defined(USE_ASH) 281 #if defined(USE_ASH)
282 if (create_params.state == ui::SHOW_STATE_DETACHED) { 282 if (create_params.state == ui::SHOW_STATE_DETACHED) {
283 gfx::Rect window_bounds(create_params.bounds.x(), 283 gfx::Rect window_bounds(create_params.bounds.x(),
284 create_params.bounds.y(), 284 create_params.bounds.y(),
285 preferred_size_.width(), 285 preferred_size_.width(),
286 preferred_size_.height()); 286 preferred_size_.height());
287 aura::Window* native_window = GetNativeWindow(); 287 aura::Window* native_window = GetNativeWindow();
288 ash::wm::GetWindowSettings(native_window)->set_panel_attached(false); 288 ash::wm::GetWindowState(native_window)->set_panel_attached(false);
289 native_window->SetDefaultParentByRootWindow( 289 native_window->SetDefaultParentByRootWindow(
290 native_window->GetRootWindow(), native_window->GetBoundsInScreen()); 290 native_window->GetRootWindow(), native_window->GetBoundsInScreen());
291 window_->SetBounds(window_bounds); 291 window_->SetBounds(window_bounds);
292 } 292 }
293 #else 293 #else
294 // TODO(stevenjb): NativeAppWindow panels need to be implemented for other 294 // TODO(stevenjb): NativeAppWindow panels need to be implemented for other
295 // platforms. 295 // platforms.
296 #endif 296 #endif
297 } 297 }
298 298
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
405 } 405 }
406 406
407 void NativeAppWindowViews::FlashFrame(bool flash) { 407 void NativeAppWindowViews::FlashFrame(bool flash) {
408 window_->FlashFrame(flash); 408 window_->FlashFrame(flash);
409 } 409 }
410 410
411 bool NativeAppWindowViews::IsAlwaysOnTop() const { 411 bool NativeAppWindowViews::IsAlwaysOnTop() const {
412 if (!shell_window_->window_type_is_panel()) 412 if (!shell_window_->window_type_is_panel())
413 return false; 413 return false;
414 #if defined(USE_ASH) 414 #if defined(USE_ASH)
415 return ash::wm::GetWindowSettings(window_->GetNativeWindow())-> 415 return ash::wm::GetWindowState(window_->GetNativeWindow())->
416 panel_attached(); 416 panel_attached();
417 #else 417 #else
418 return true; 418 return true;
419 #endif 419 #endif
420 } 420 }
421 421
422 gfx::Insets NativeAppWindowViews::GetFrameInsets() const { 422 gfx::Insets NativeAppWindowViews::GetFrameInsets() const {
423 if (frameless()) 423 if (frameless())
424 return gfx::Insets(); 424 return gfx::Insets();
425 425
(...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after
743 } 743 }
744 744
745 bool NativeAppWindowViews::IsFullscreenOrPending() const { 745 bool NativeAppWindowViews::IsFullscreenOrPending() const {
746 return is_fullscreen_; 746 return is_fullscreen_;
747 } 747 }
748 748
749 bool NativeAppWindowViews::IsDetached() const { 749 bool NativeAppWindowViews::IsDetached() const {
750 if (!shell_window_->window_type_is_panel()) 750 if (!shell_window_->window_type_is_panel())
751 return false; 751 return false;
752 #if defined(USE_ASH) 752 #if defined(USE_ASH)
753 return !ash::wm::GetWindowSettings(window_->GetNativeWindow())-> 753 return !ash::wm::GetWindowState(window_->GetNativeWindow())->panel_attached();
754 panel_attached();
755 #else 754 #else
756 return false; 755 return false;
757 #endif 756 #endif
758 } 757 }
759 758
760 views::View* NativeAppWindowViews::GetContentsView() { 759 views::View* NativeAppWindowViews::GetContentsView() {
761 return this; 760 return this;
762 } 761 }
763 762
764 void NativeAppWindowViews::UpdateWindowIcon() { 763 void NativeAppWindowViews::UpdateWindowIcon() {
(...skipping 20 matching lines...) Expand all
785 784
786 void NativeAppWindowViews::HandleKeyboardEvent( 785 void NativeAppWindowViews::HandleKeyboardEvent(
787 const content::NativeWebKeyboardEvent& event) { 786 const content::NativeWebKeyboardEvent& event) {
788 unhandled_keyboard_event_handler_.HandleKeyboardEvent(event, 787 unhandled_keyboard_event_handler_.HandleKeyboardEvent(event,
789 GetFocusManager()); 788 GetFocusManager());
790 } 789 }
791 790
792 void NativeAppWindowViews::RenderViewHostChanged() { 791 void NativeAppWindowViews::RenderViewHostChanged() {
793 OnViewWasResized(); 792 OnViewWasResized();
794 } 793 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/ash/window_positioner.cc ('k') | chrome/browser/ui/views/frame/browser_frame_aura.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698