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

Side by Side Diff: chrome/browser/views/options/advanced_contents_view.cc

Issue 10896: Re-do the way browser windows are shown:... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 12 years, 1 month 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 (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/options/advanced_contents_view.h" 5 #include "chrome/browser/views/options/advanced_contents_view.h"
6 6
7 #include <windows.h> 7 #include <windows.h>
8 8
9 #include <cryptuiapi.h> 9 #include <cryptuiapi.h>
10 #pragma comment(lib, "cryptui.lib") 10 #pragma comment(lib, "cryptui.lib")
(...skipping 425 matching lines...) Expand 10 before | Expand all | Expand 10 after
436 } else if (sender == show_cookies_button_) { 436 } else if (sender == show_cookies_button_) {
437 UserMetricsRecordAction(L"Options_ShowCookies", NULL); 437 UserMetricsRecordAction(L"Options_ShowCookies", NULL);
438 CookiesView::ShowCookiesWindow(profile()); 438 CookiesView::ShowCookiesWindow(profile());
439 } 439 }
440 } 440 }
441 441
442 void PrivacySection::LinkActivated(views::Link* source, int event_flags) { 442 void PrivacySection::LinkActivated(views::Link* source, int event_flags) {
443 if (source == learn_more_link_) { 443 if (source == learn_more_link_) {
444 // We open a new browser window so the Options dialog doesn't get lost 444 // We open a new browser window so the Options dialog doesn't get lost
445 // behind other windows. 445 // behind other windows.
446 Browser* browser = new Browser(gfx::Rect(), SW_SHOWNORMAL, profile(), 446 Browser* browser = Browser::Create(profile());
447 BrowserType::TABBED_BROWSER, 447 browser->OpenURL(GURL(l10n_util::GetString(IDS_LEARN_MORE_PRIVACY_URL)),
448 std::wstring()); 448 GURL(), NEW_WINDOW, PageTransition::LINK);
449 browser->OpenURL(
450 GURL(l10n_util::GetString(IDS_LEARN_MORE_PRIVACY_URL)),
451 GURL(),
452 NEW_WINDOW,
453 PageTransition::LINK);
454 } 449 }
455 } 450 }
456 451
457 void PrivacySection::Layout() { 452 void PrivacySection::Layout() {
458 // We override this to try and set the width of the enable logging checkbox 453 // We override this to try and set the width of the enable logging checkbox
459 // to the width of the parent less some fudging since the checkbox's 454 // to the width of the parent less some fudging since the checkbox's
460 // preferred size calculation code is dependent on its width, and if we don't 455 // preferred size calculation code is dependent on its width, and if we don't
461 // do this then it will return 0 as a preferred width when GridLayout (called 456 // do this then it will return 0 as a preferred width when GridLayout (called
462 // from View::Layout) tries to access it. 457 // from View::Layout) tries to access it.
463 views::View* parent = GetParent(); 458 views::View* parent = GetParent();
(...skipping 740 matching lines...) Expand 10 before | Expand all | Expand 10 after
1204 void AdvancedScrollViewContainer::Layout() { 1199 void AdvancedScrollViewContainer::Layout() {
1205 gfx::Rect lb = GetLocalBounds(false); 1200 gfx::Rect lb = GetLocalBounds(false);
1206 1201
1207 gfx::Size border = gfx::NativeTheme::instance()->GetThemeBorderSize( 1202 gfx::Size border = gfx::NativeTheme::instance()->GetThemeBorderSize(
1208 gfx::NativeTheme::LIST); 1203 gfx::NativeTheme::LIST);
1209 lb.Inset(border.width(), border.height()); 1204 lb.Inset(border.width(), border.height());
1210 scroll_view_->SetBounds(lb); 1205 scroll_view_->SetBounds(lb);
1211 scroll_view_->Layout(); 1206 scroll_view_->Layout();
1212 } 1207 }
1213 1208
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698