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

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: More compile fix for 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 549 matching lines...) Expand 10 before | Expand all | Expand 10 after
560 bool ChromeNativeAppWindowViews::WidgetHasHitTestMask() const { 560 bool ChromeNativeAppWindowViews::WidgetHasHitTestMask() const {
561 return shape_ != NULL; 561 return shape_ != NULL;
562 } 562 }
563 563
564 void ChromeNativeAppWindowViews::GetWidgetHitTestMask(gfx::Path* mask) const { 564 void ChromeNativeAppWindowViews::GetWidgetHitTestMask(gfx::Path* mask) const {
565 shape_->getBoundaryPath(mask); 565 shape_->getBoundaryPath(mask);
566 } 566 }
567 567
568 // views::View implementation. 568 // views::View implementation.
569 569
570 gfx::Size ChromeNativeAppWindowViews::GetPreferredSize() { 570 gfx::Size ChromeNativeAppWindowViews::GetPreferredSize() const {
571 if (!preferred_size_.IsEmpty()) 571 if (!preferred_size_.IsEmpty())
572 return preferred_size_; 572 return preferred_size_;
573 return NativeAppWindowViews::GetPreferredSize(); 573 return NativeAppWindowViews::GetPreferredSize();
574 } 574 }
575 575
576 bool ChromeNativeAppWindowViews::AcceleratorPressed( 576 bool ChromeNativeAppWindowViews::AcceleratorPressed(
577 const ui::Accelerator& accelerator) { 577 const ui::Accelerator& accelerator) {
578 const std::map<ui::Accelerator, int>& accelerator_table = 578 const std::map<ui::Accelerator, int>& accelerator_table =
579 GetAcceleratorTable(); 579 GetAcceleratorTable();
580 std::map<ui::Accelerator, int>::const_iterator iter = 580 std::map<ui::Accelerator, int>::const_iterator iter =
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
712 InitializePanelWindow(create_params); 712 InitializePanelWindow(create_params);
713 } else { 713 } else {
714 InitializeDefaultWindow(create_params); 714 InitializeDefaultWindow(create_params);
715 } 715 }
716 extension_keybinding_registry_.reset(new ExtensionKeybindingRegistryViews( 716 extension_keybinding_registry_.reset(new ExtensionKeybindingRegistryViews(
717 Profile::FromBrowserContext(app_window->browser_context()), 717 Profile::FromBrowserContext(app_window->browser_context()),
718 widget()->GetFocusManager(), 718 widget()->GetFocusManager(),
719 extensions::ExtensionKeybindingRegistry::PLATFORM_APPS_ONLY, 719 extensions::ExtensionKeybindingRegistry::PLATFORM_APPS_ONLY,
720 NULL)); 720 NULL));
721 } 721 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698