OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "build/build_config.h" | 5 #include "build/build_config.h" |
6 | 6 |
7 #include "app/l10n_util.h" | 7 #include "app/l10n_util.h" |
8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
9 #include "base/utf_string_conversions.h" | 9 #include "base/utf_string_conversions.h" |
10 #include "chrome/browser/cert_store.h" | 10 #include "chrome/browser/cert_store.h" |
11 #include "chrome/browser/certificate_viewer.h" | 11 #include "chrome/browser/certificate_viewer.h" |
12 #include "chrome/browser/page_info_model.h" | 12 #include "chrome/browser/page_info_model.h" |
13 #include "chrome/browser/page_info_window.h" | 13 #include "chrome/browser/page_info_window.h" |
| 14 #include "chrome/browser/views/window.h" |
14 #include "chrome/common/pref_names.h" | 15 #include "chrome/common/pref_names.h" |
15 #include "grit/locale_settings.h" | 16 #include "grit/locale_settings.h" |
16 #include "grit/generated_resources.h" | 17 #include "grit/generated_resources.h" |
17 #include "net/base/x509_certificate.h" | 18 #include "net/base/x509_certificate.h" |
18 #include "views/background.h" | 19 #include "views/background.h" |
19 #include "views/grid_layout.h" | 20 #include "views/grid_layout.h" |
20 #include "views/controls/button/native_button.h" | 21 #include "views/controls/button/native_button.h" |
21 #include "views/controls/button/button.h" | 22 #include "views/controls/button/button.h" |
22 #include "views/controls/image_view.h" | 23 #include "views/controls/image_view.h" |
23 #include "views/controls/label.h" | 24 #include "views/controls/label.h" |
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
172 // the new PageInfo window so they don't overlap entirely. | 173 // the new PageInfo window so they don't overlap entirely. |
173 // Window::Init will position the window from the stored location. | 174 // Window::Init will position the window from the stored location. |
174 gfx::Rect bounds; | 175 gfx::Rect bounds; |
175 bool maximized = false; | 176 bool maximized = false; |
176 if (GetSavedWindowBounds(&bounds) && GetSavedMaximizedState(&maximized)) { | 177 if (GetSavedWindowBounds(&bounds) && GetSavedMaximizedState(&maximized)) { |
177 CalculateWindowBounds(&bounds); | 178 CalculateWindowBounds(&bounds); |
178 SaveWindowPlacement(bounds, maximized); | 179 SaveWindowPlacement(bounds, maximized); |
179 } | 180 } |
180 } | 181 } |
181 | 182 |
182 views::Window::CreateChromeWindow(parent, gfx::Rect(), this); | 183 browser::CreateViewsWindow(parent, gfx::Rect(), this); |
183 } | 184 } |
184 | 185 |
185 gfx::Size PageInfoWindowView::GetPreferredSize() { | 186 gfx::Size PageInfoWindowView::GetPreferredSize() { |
186 return gfx::Size(views::Window::GetLocalizedContentsSize( | 187 return gfx::Size(views::Window::GetLocalizedContentsSize( |
187 IDS_PAGEINFO_DIALOG_WIDTH_CHARS, IDS_PAGEINFO_DIALOG_HEIGHT_LINES)); | 188 IDS_PAGEINFO_DIALOG_WIDTH_CHARS, IDS_PAGEINFO_DIALOG_HEIGHT_LINES)); |
188 } | 189 } |
189 | 190 |
190 void PageInfoWindowView::LayoutSections() { | 191 void PageInfoWindowView::LayoutSections() { |
191 // Remove all the existing sections. | 192 // Remove all the existing sections. |
192 RemoveAllChildViews(true); | 193 RemoveAllChildViews(true); |
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
430 Profile* profile, | 431 Profile* profile, |
431 const GURL& url, | 432 const GURL& url, |
432 const NavigationEntry::SSLStatus& ssl, | 433 const NavigationEntry::SSLStatus& ssl, |
433 bool show_history) { | 434 bool show_history) { |
434 PageInfoWindowView* page_info_window = | 435 PageInfoWindowView* page_info_window = |
435 new PageInfoWindowView(parent, profile, url, ssl, show_history); | 436 new PageInfoWindowView(parent, profile, url, ssl, show_history); |
436 page_info_window->Show(); | 437 page_info_window->Show(); |
437 } | 438 } |
438 | 439 |
439 } | 440 } |
OLD | NEW |