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

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

Issue 3538012: Use BubbleWindow for ChromeOS windows/dialogs. (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: fix win trybot Created 10 years, 2 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) 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/l10n_util.h" 9 #include "app/l10n_util.h"
10 #include "app/resource_bundle.h" 10 #include "app/resource_bundle.h"
11 #include "base/string_util.h" 11 #include "base/string_util.h"
12 #include "base/utf_string_conversions.h" 12 #include "base/utf_string_conversions.h"
13 #include "chrome/browser/chromeos/cros/cros_library.h" 13 #include "chrome/browser/chromeos/cros/cros_library.h"
14 #include "chrome/browser/chromeos/options/network_config_view.h" 14 #include "chrome/browser/chromeos/options/network_config_view.h"
15 #include "chrome/browser/chromeos/options/options_window_view.h" 15 #include "chrome/browser/chromeos/options/options_window_view.h"
16 #include "chrome/browser/chromeos/status/network_menu.h" 16 #include "chrome/browser/chromeos/status/network_menu.h"
17 #include "chrome/browser/views/window.h"
17 #include "grit/generated_resources.h" 18 #include "grit/generated_resources.h"
18 #include "grit/theme_resources.h" 19 #include "grit/theme_resources.h"
19 #include "views/controls/button/native_button.h" 20 #include "views/controls/button/native_button.h"
20 #include "views/controls/combobox/combobox.h" 21 #include "views/controls/combobox/combobox.h"
21 #include "views/controls/image_view.h" 22 #include "views/controls/image_view.h"
22 #include "views/controls/scroll_view.h" 23 #include "views/controls/scroll_view.h"
23 #include "views/widget/widget.h" 24 #include "views/widget/widget.h"
24 #include "views/window/window.h" 25 #include "views/window/window.h"
25 26
26 namespace chromeos { 27 namespace chromeos {
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 layout_->SkipColumns(1); 210 layout_->SkipColumns(1);
210 views::Label* status_label = new views::Label(status); 211 views::Label* status_label = new views::Label(status);
211 status_label->SetFont(rb.GetFont(ResourceBundle::SmallFont)); 212 status_label->SetFont(rb.GetFont(ResourceBundle::SmallFont));
212 status_label->SetColor(SK_ColorLTGRAY); 213 status_label->SetColor(SK_ColorLTGRAY);
213 status_label->SetHorizontalAlignment(views::Label::ALIGN_LEFT); 214 status_label->SetHorizontalAlignment(views::Label::ALIGN_LEFT);
214 layout_->AddView(status_label); 215 layout_->AddView(status_label);
215 layout_->AddPaddingRow(0, kRelatedControlVerticalSpacing); 216 layout_->AddPaddingRow(0, kRelatedControlVerticalSpacing);
216 } 217 }
217 218
218 void NetworkSection::CreateModalPopup(views::WindowDelegate* view) { 219 void NetworkSection::CreateModalPopup(views::WindowDelegate* view) {
219 views::Window* window = views::Window::CreateChromeWindow( 220 views::Window* window = browser::CreateViewsWindow(
220 GetOptionsViewParent(), gfx::Rect(), view); 221 GetOptionsViewParent(), gfx::Rect(), view);
221 window->SetIsAlwaysOnTop(true); 222 window->SetIsAlwaysOnTop(true);
222 window->Show(); 223 window->Show();
223 } 224 }
224 225
225 //////////////////////////////////////////////////////////////////////////////// 226 ////////////////////////////////////////////////////////////////////////////////
226 // WiredSection 227 // WiredSection
227 228
228 class WiredSection : public NetworkSection { 229 class WiredSection : public NetworkSection {
229 public: 230 public:
(...skipping 381 matching lines...) Expand 10 before | Expand all | Expand 10 after
611 scroll_view_->SetBounds(GetLocalBounds(false)); 612 scroll_view_->SetBounds(GetLocalBounds(false));
612 scroll_view_->Layout(); 613 scroll_view_->Layout();
613 } 614 }
614 615
615 void InternetPageView::InitControlLayout() { 616 void InternetPageView::InitControlLayout() {
616 AddChildView(scroll_view_); 617 AddChildView(scroll_view_);
617 scroll_view_->SetContents(contents_view_); 618 scroll_view_->SetContents(contents_view_);
618 } 619 }
619 620
620 } // namespace chromeos 621 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/network_message_observer.cc ('k') | chrome/browser/chromeos/options/language_config_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698