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

Side by Side Diff: chrome/views/window.cc

Issue 27247: Non-functional cleanup:... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 10 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
« no previous file with comments | « chrome/browser/views/frame/opaque_non_client_view.cc ('k') | chrome/views/window_delegate.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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/views/window.h" 5 #include "chrome/views/window.h"
6 6
7 #include "base/win_util.h" 7 #include "base/win_util.h"
8 #include "chrome/app/chrome_dll_resource.h" 8 #include "chrome/app/chrome_dll_resource.h"
9 #include "chrome/common/gfx/chrome_font.h" 9 #include "chrome/common/gfx/chrome_font.h"
10 #include "chrome/common/gfx/icon_util.h" 10 #include "chrome/common/gfx/icon_util.h"
(...skipping 612 matching lines...) Expand 10 before | Expand all | Expand 10 after
623 ::SetWindowPos(GetHWND(), 623 ::SetWindowPos(GetHWND(),
624 is_always_on_top_ ? HWND_TOPMOST : HWND_NOTOPMOST, 624 is_always_on_top_ ? HWND_TOPMOST : HWND_NOTOPMOST,
625 0, 0, 0, 0, 625 0, 0, 0, 0,
626 SWP_NOMOVE | SWP_NOSIZE | SWP_FRAMECHANGED); 626 SWP_NOMOVE | SWP_NOSIZE | SWP_FRAMECHANGED);
627 } 627 }
628 628
629 DWORD Window::CalculateWindowStyle() { 629 DWORD Window::CalculateWindowStyle() {
630 DWORD window_styles = WS_CLIPCHILDREN | WS_CLIPSIBLINGS | WS_SYSMENU; 630 DWORD window_styles = WS_CLIPCHILDREN | WS_CLIPSIBLINGS | WS_SYSMENU;
631 bool can_resize = window_delegate_->CanResize(); 631 bool can_resize = window_delegate_->CanResize();
632 bool can_maximize = window_delegate_->CanMaximize(); 632 bool can_maximize = window_delegate_->CanMaximize();
633 if ((can_resize && can_maximize) || can_maximize) { 633 if (can_maximize) {
634 window_styles |= WS_OVERLAPPEDWINDOW; 634 window_styles |= WS_OVERLAPPEDWINDOW;
635 } else if (can_resize) { 635 } else if (can_resize) {
636 window_styles |= WS_OVERLAPPED | WS_THICKFRAME; 636 window_styles |= WS_OVERLAPPED | WS_THICKFRAME;
637 } 637 }
638 if (window_delegate_->AsDialogDelegate()) { 638 if (window_delegate_->AsDialogDelegate()) {
639 window_styles |= DS_MODALFRAME; 639 window_styles |= DS_MODALFRAME;
640 // NOTE: Turning this off means we lose the close button, which is bad. 640 // NOTE: Turning this off means we lose the close button, which is bad.
641 // Turning it on though means the user can maximize or size the window 641 // Turning it on though means the user can maximize or size the window
642 // from the system menu, which is worse. We may need to provide our own 642 // from the system menu, which is worse. We may need to provide our own
643 // menu to get the close button to appear properly. 643 // menu to get the close button to appear properly.
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
678 void Window::InitClass() { 678 void Window::InitClass() {
679 static bool initialized = false; 679 static bool initialized = false;
680 if (!initialized) { 680 if (!initialized) {
681 nwse_cursor_ = LoadCursor(NULL, IDC_SIZENWSE); 681 nwse_cursor_ = LoadCursor(NULL, IDC_SIZENWSE);
682 initialized = true; 682 initialized = true;
683 } 683 }
684 } 684 }
685 685
686 } // namespace views 686 } // namespace views
687 687
OLDNEW
« no previous file with comments | « chrome/browser/views/frame/opaque_non_client_view.cc ('k') | chrome/views/window_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698