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

Side by Side Diff: chrome/browser/chromeos/options/internet_page_view.cc

Issue 3019015: Land for njw:... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 10 years, 5 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
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 "chrome/browser/chromeos/options/internet_page_view.h" 5 #include "chrome/browser/chromeos/options/internet_page_view.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "app/combobox_model.h" 9 #include "app/combobox_model.h"
10 #include "chrome/browser/chromeos/cros/cros_library.h" 10 #include "chrome/browser/chromeos/cros/cros_library.h"
(...skipping 567 matching lines...) Expand 10 before | Expand all | Expand 10 after
578 layout->AddPaddingRow(0, kRelatedControlVerticalSpacing); 578 layout->AddPaddingRow(0, kRelatedControlVerticalSpacing);
579 } 579 }
580 580
581 //////////////////////////////////////////////////////////////////////////////// 581 ////////////////////////////////////////////////////////////////////////////////
582 // InternetPageView 582 // InternetPageView
583 583
584 InternetPageView::InternetPageView(Profile* profile) 584 InternetPageView::InternetPageView(Profile* profile)
585 : SettingsPageView(profile), 585 : SettingsPageView(profile),
586 contents_view_(new InternetPageContentView(profile)), 586 contents_view_(new InternetPageContentView(profile)),
587 scroll_view_(new views::ScrollView) { 587 scroll_view_(new views::ScrollView) {
588 CrosLibrary::Get()->GetNetworkLibrary()->AddObserver(this); 588 NetworkLibrary* cros = CrosLibrary::Get()->GetNetworkLibrary();
589 cros->UpdateSystemInfo();
590 cros->AddObserver(this);
589 } 591 }
590 592
591 InternetPageView::~InternetPageView() { 593 InternetPageView::~InternetPageView() {
592 CrosLibrary::Get()->GetNetworkLibrary()->RemoveObserver(this); 594 CrosLibrary::Get()->GetNetworkLibrary()->RemoveObserver(this);
593 } 595 }
594 596
595 void InternetPageView::NetworkChanged(NetworkLibrary* obj) { 597 void InternetPageView::NetworkChanged(NetworkLibrary* obj) {
596 // Refresh wired, wireless, and remembered networks. 598 // Refresh wired, wireless, and remembered networks.
597 // Remember the current scroll region, and try to scroll back afterwards. 599 // Remember the current scroll region, and try to scroll back afterwards.
598 gfx::Rect rect = scroll_view_->GetVisibleRect(); 600 gfx::Rect rect = scroll_view_->GetVisibleRect();
599 contents_view_->RefreshContents(); 601 contents_view_->RefreshContents();
600 Layout(); 602 Layout();
601 scroll_view_->ScrollContentsRegionToBeVisible(rect); 603 scroll_view_->ScrollContentsRegionToBeVisible(rect);
602 } 604 }
603 605
604 void InternetPageView::Layout() { 606 void InternetPageView::Layout() {
605 contents_view_->Layout(); 607 contents_view_->Layout();
606 scroll_view_->SetBounds(GetLocalBounds(false)); 608 scroll_view_->SetBounds(GetLocalBounds(false));
607 scroll_view_->Layout(); 609 scroll_view_->Layout();
608 } 610 }
609 611
610 void InternetPageView::InitControlLayout() { 612 void InternetPageView::InitControlLayout() {
611 AddChildView(scroll_view_); 613 AddChildView(scroll_view_);
612 scroll_view_->SetContents(contents_view_); 614 scroll_view_->SetContents(contents_view_);
613 } 615 }
614 616
615 } // namespace chromeos 617 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/cros/network_library.cc ('k') | chrome/browser/chromeos/status/network_menu_button.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698