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

Side by Side Diff: chrome/browser/views/page_info_window.cc

Issue 115378: Move Always On Top setting out of Window/WindowDelegate and into task manager... (Closed) Base URL: svn://chrome-svn.corp.google.com/chrome/trunk/src/
Patch Set: '' Created 11 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
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/browser/views/page_info_window.h" 5 #include "chrome/browser/views/page_info_window.h"
6 6
7 #include <cryptuiapi.h> 7 #include <cryptuiapi.h>
8 #pragma comment(lib, "cryptui.lib") 8 #pragma comment(lib, "cryptui.lib")
9 9
10 #include <atlbase.h> 10 #include <atlbase.h>
(...skipping 544 matching lines...) Expand 10 before | Expand all | Expand 10 after
555 555
556 if (opened_window_count_ > 0) { 556 if (opened_window_count_ > 0) {
557 // There already is a PageInfo window opened. Let's shift the location of 557 // There already is a PageInfo window opened. Let's shift the location of
558 // the new PageInfo window so they don't overlap entirely. 558 // the new PageInfo window so they don't overlap entirely.
559 // Window::Init will position the window from the stored location. 559 // Window::Init will position the window from the stored location.
560 gfx::Rect bounds; 560 gfx::Rect bounds;
561 bool maximized = false; 561 bool maximized = false;
562 if (GetSavedWindowBounds(&bounds) && GetSavedMaximizedState(&maximized)) { 562 if (GetSavedWindowBounds(&bounds) && GetSavedMaximizedState(&maximized)) {
563 CRect bounds_crect(bounds.ToRECT()); 563 CRect bounds_crect(bounds.ToRECT());
564 CalculateWindowBounds(&bounds_crect); 564 CalculateWindowBounds(&bounds_crect);
565 SaveWindowPlacement(gfx::Rect(bounds_crect), maximized, false); 565 SaveWindowPlacement(gfx::Rect(bounds_crect), maximized);
566 } 566 }
567 } 567 }
568 568
569 views::Window::CreateChromeWindow(parent, gfx::Rect(), this); 569 views::Window::CreateChromeWindow(parent, gfx::Rect(), this);
570 // TODO(beng): (Cleanup) - cert viewer button should use GetExtraView. 570 // TODO(beng): (Cleanup) - cert viewer button should use GetExtraView.
571 571
572 if (cert_id_) { 572 if (cert_id_) {
573 scoped_refptr<net::X509Certificate> cert; 573 scoped_refptr<net::X509Certificate> cert;
574 CertStore::GetSharedInstance()->RetrieveCert(cert_id_, &cert); 574 CertStore::GetSharedInstance()->RetrieveCert(cert_id_, &cert);
575 // When running with Gears, we have no os certificate, so there is no cert 575 // When running with Gears, we have no os certificate, so there is no cert
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
680 // Search the cert store that 'cert' is in when building the cert chain. 680 // Search the cert store that 'cert' is in when building the cert chain.
681 HCERTSTORE cert_store = view_info.pCertContext->hCertStore; 681 HCERTSTORE cert_store = view_info.pCertContext->hCertStore;
682 view_info.cStores = 1; 682 view_info.cStores = 1;
683 view_info.rghStores = &cert_store; 683 view_info.rghStores = &cert_store;
684 BOOL properties_changed; 684 BOOL properties_changed;
685 685
686 // This next call blocks but keeps processing windows messages, making it 686 // This next call blocks but keeps processing windows messages, making it
687 // modal to the browser window. 687 // modal to the browser window.
688 BOOL rv = ::CryptUIDlgViewCertificate(&view_info, &properties_changed); 688 BOOL rv = ::CryptUIDlgViewCertificate(&view_info, &properties_changed);
689 } 689 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698