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

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

Issue 3171031: Add mixed content warning to the Page Info bubble.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 4 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/page_info_bubble_view.cc ('k') | no next file » | 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) 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/resource_bundle.h" 7 #include "app/resource_bundle.h"
8 #include "app/l10n_util.h" 8 #include "app/l10n_util.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/utf_string_conversions.h" 10 #include "base/utf_string_conversions.h"
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 virtual std::wstring GetWindowTitle() const; 75 virtual std::wstring GetWindowTitle() const;
76 virtual std::wstring GetWindowName() const; 76 virtual std::wstring GetWindowName() const;
77 virtual views::View* GetContentsView(); 77 virtual views::View* GetContentsView();
78 virtual views::View* GetExtraView(); 78 virtual views::View* GetExtraView();
79 virtual bool CanResize() const { return true; } 79 virtual bool CanResize() const { return true; }
80 80
81 // PageInfoModel::PageInfoModelObserver method. 81 // PageInfoModel::PageInfoModelObserver method.
82 virtual void ModelChanged(); 82 virtual void ModelChanged();
83 83
84 private: 84 private:
85 // This retreives the sections from the model and lay them out. 85 // This retrieves the sections from the model and lays them out.
86 void LayoutSections(); 86 void LayoutSections();
87 87
88 // Offsets the specified rectangle so it is showing on the screen and shifted 88 // Offsets the specified rectangle so it is showing on the screen and shifted
89 // from its original location. 89 // from its original location.
90 void CalculateWindowBounds(gfx::Rect* bounds); 90 void CalculateWindowBounds(gfx::Rect* bounds);
91 91
92 views::NativeButton* cert_info_button_; 92 views::NativeButton* cert_info_button_;
93 93
94 // The model providing the various section info. 94 // The model providing the various section info.
95 PageInfoModel model_; 95 PageInfoModel model_;
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 1, // Resize weight. 210 1, // Resize weight.
211 views::GridLayout::USE_PREF, // Size type. 211 views::GridLayout::USE_PREF, // Size type.
212 0, // Ignored for USE_PREF. 212 0, // Ignored for USE_PREF.
213 0); // Minimum size. 213 0); // Minimum size.
214 columns->AddPaddingColumn(0, kHorizontalPadding); 214 columns->AddPaddingColumn(0, kHorizontalPadding);
215 215
216 layout->AddPaddingRow(0, kVerticalPadding); 216 layout->AddPaddingRow(0, kVerticalPadding);
217 for (int i = 0; i < model_.GetSectionCount(); ++i) { 217 for (int i = 0; i < model_.GetSectionCount(); ++i) {
218 PageInfoModel::SectionInfo info = model_.GetSectionInfo(i); 218 PageInfoModel::SectionInfo info = model_.GetSectionInfo(i);
219 layout->StartRow(0, 0); 219 layout->StartRow(0, 0);
220 layout->AddView(new Section(info.title, info.state, info.headline, 220 layout->AddView(new Section(
221 info.description)); 221 info.title, info.state != PageInfoModel::SECTION_STATE_ERROR,
222 info.headline, info.description));
222 layout->AddPaddingRow(0, kVerticalPadding); 223 layout->AddPaddingRow(0, kVerticalPadding);
223 } 224 }
224 layout->AddPaddingRow(1, kVerticalPadding); 225 layout->AddPaddingRow(1, kVerticalPadding);
225 226
226 Layout(); 227 Layout();
227 } 228 }
228 229
229 void PageInfoWindowView::Show() { 230 void PageInfoWindowView::Show() {
230 window()->Show(); 231 window()->Show();
231 opened_window_count_++; 232 opened_window_count_++;
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
446 Profile* profile, 447 Profile* profile,
447 const GURL& url, 448 const GURL& url,
448 const NavigationEntry::SSLStatus& ssl, 449 const NavigationEntry::SSLStatus& ssl,
449 bool show_history) { 450 bool show_history) {
450 PageInfoWindowView* page_info_window = 451 PageInfoWindowView* page_info_window =
451 new PageInfoWindowView(parent, profile, url, ssl, show_history); 452 new PageInfoWindowView(parent, profile, url, ssl, show_history);
452 page_info_window->Show(); 453 page_info_window->Show();
453 } 454 }
454 455
455 } 456 }
OLDNEW
« no previous file with comments | « chrome/browser/views/page_info_bubble_view.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698