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

Unified Diff: chrome/browser/chromeos/options/network_config_view.cc

Issue 2659973003: [Harmony] Harmony Chrome OS Wifi dialog. (Closed)
Patch Set: Address ellyjones@'s comments. Created 3 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chromeos/options/network_config_view.cc
diff --git a/chrome/browser/chromeos/options/network_config_view.cc b/chrome/browser/chromeos/options/network_config_view.cc
index 9b1c9ef87deb86d08cd8521989689aedafc06e9e..4cdb6ecac5ff1f8f95b79ba4fa07740989153761 100644
--- a/chrome/browser/chromeos/options/network_config_view.cc
+++ b/chrome/browser/chromeos/options/network_config_view.cc
@@ -69,6 +69,7 @@ gfx::NativeWindow GetParentForUnhostedDialog() {
// static
const int ChildNetworkConfigView::kInputFieldMinWidth = 270;
+const int ChildNetworkConfigView::kInputFieldHeight = 28;
NetworkConfigView::NetworkConfigView()
: child_config_view_(nullptr),
@@ -199,6 +200,10 @@ views::View* NetworkConfigView::GetInitiallyFocusedView() {
return child_config_view_->GetInitiallyFocusedView();
}
+int NetworkConfigView::GetDefaultDialogButton() const {
+ return ui::DIALOG_BUTTON_CANCEL;
+}
+
base::string16 NetworkConfigView::GetWindowTitle() const {
DCHECK(!child_config_view_->GetTitle().empty());
return child_config_view_->GetTitle();
@@ -232,9 +237,12 @@ void NetworkConfigView::ShowAdvancedView() {
true /* show_8021x */);
AddChildView(child_config_view_);
// Resize the window to be able to hold the new widgets.
- gfx::Size size = views::Widget::GetLocalizedContentsSize(
+ gfx::Size size = GetWidget()->client_view()->GetPreferredSize();
+ gfx::Size predefined_size = views::Widget::GetLocalizedContentsSize(
IDS_JOIN_WIFI_NETWORK_DIALOG_ADVANCED_WIDTH_CHARS,
IDS_JOIN_WIFI_NETWORK_DIALOG_ADVANCED_MINIMUM_HEIGHT_LINES);
+ size.SetToMax(predefined_size);
+
// Get the new bounds with desired size at the same center point.
gfx::Rect bounds = GetWidget()->GetWindowBoundsInScreen();
int horiz_padding = bounds.width() - size.width();
« no previous file with comments | « chrome/browser/chromeos/options/network_config_view.h ('k') | chrome/browser/chromeos/options/wifi_config_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698