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

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

Issue 273223002: views: Make view::Views::GetPreferredSize() const. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase to ToT Created 6 years, 7 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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.h" 5 #include "chrome/browser/ui/views/apps/chrome_native_app_window_views.h"
6 6
7 #include "apps/ui/views/app_window_frame_view.h" 7 #include "apps/ui/views/app_window_frame_view.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "chrome/app/chrome_command_ids.h" 9 #include "chrome/app/chrome_command_ids.h"
10 #include "chrome/browser/app_mode/app_mode_utils.h" 10 #include "chrome/browser/app_mode/app_mode_utils.h"
(...skipping 556 matching lines...) Expand 10 before | Expand all | Expand 10 after
567 bool ChromeNativeAppWindowViews::WidgetHasHitTestMask() const { 567 bool ChromeNativeAppWindowViews::WidgetHasHitTestMask() const {
568 return shape_ != NULL; 568 return shape_ != NULL;
569 } 569 }
570 570
571 void ChromeNativeAppWindowViews::GetWidgetHitTestMask(gfx::Path* mask) const { 571 void ChromeNativeAppWindowViews::GetWidgetHitTestMask(gfx::Path* mask) const {
572 shape_->getBoundaryPath(mask); 572 shape_->getBoundaryPath(mask);
573 } 573 }
574 574
575 // views::View implementation. 575 // views::View implementation.
576 576
577 gfx::Size ChromeNativeAppWindowViews::GetPreferredSize() { 577 gfx::Size ChromeNativeAppWindowViews::GetPreferredSize() const {
578 if (!preferred_size_.IsEmpty()) 578 if (!preferred_size_.IsEmpty())
579 return preferred_size_; 579 return preferred_size_;
580 return NativeAppWindowViews::GetPreferredSize(); 580 return NativeAppWindowViews::GetPreferredSize();
581 } 581 }
582 582
583 bool ChromeNativeAppWindowViews::AcceleratorPressed( 583 bool ChromeNativeAppWindowViews::AcceleratorPressed(
584 const ui::Accelerator& accelerator) { 584 const ui::Accelerator& accelerator) {
585 const std::map<ui::Accelerator, int>& accelerator_table = 585 const std::map<ui::Accelerator, int>& accelerator_table =
586 GetAcceleratorTable(); 586 GetAcceleratorTable();
587 std::map<ui::Accelerator, int>::const_iterator iter = 587 std::map<ui::Accelerator, int>::const_iterator iter =
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
718 InitializePanelWindow(create_params); 718 InitializePanelWindow(create_params);
719 } else { 719 } else {
720 InitializeDefaultWindow(create_params); 720 InitializeDefaultWindow(create_params);
721 } 721 }
722 extension_keybinding_registry_.reset(new ExtensionKeybindingRegistryViews( 722 extension_keybinding_registry_.reset(new ExtensionKeybindingRegistryViews(
723 Profile::FromBrowserContext(app_window->browser_context()), 723 Profile::FromBrowserContext(app_window->browser_context()),
724 widget()->GetFocusManager(), 724 widget()->GetFocusManager(),
725 extensions::ExtensionKeybindingRegistry::PLATFORM_APPS_ONLY, 725 extensions::ExtensionKeybindingRegistry::PLATFORM_APPS_ONLY,
726 NULL)); 726 NULL));
727 } 727 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698