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

Side by Side Diff: chrome/browser/chromeos/login/background_view.cc

Issue 1589021: Status area improvements:... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 8 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/login/background_view.h" 5 #include "chrome/browser/chromeos/login/background_view.h"
6 6
7 #include "app/x11_util.h" 7 #include "app/x11_util.h"
8 #include "chrome/browser/chromeos/login/rounded_rect_painter.h" 8 #include "chrome/browser/chromeos/login/rounded_rect_painter.h"
9 #include "chrome/browser/chromeos/status/clock_menu_button.h" 9 #include "chrome/browser/chromeos/status/clock_menu_button.h"
10 #include "chrome/browser/chromeos/status/network_menu_button.h" 10 #include "chrome/browser/chromeos/status/network_menu_button.h"
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 chromeos::BorderDefinition::kWizardBorder.padding + 84 chromeos::BorderDefinition::kWizardBorder.padding +
85 chromeos::BorderDefinition::kWizardBorder.corner_radius / 2; 85 chromeos::BorderDefinition::kWizardBorder.corner_radius / 2;
86 gfx::Size status_area_size = status_area_->GetPreferredSize(); 86 gfx::Size status_area_size = status_area_->GetPreferredSize();
87 status_area_->SetBounds( 87 status_area_->SetBounds(
88 width() - status_area_size.width() - right_top_padding, 88 width() - status_area_size.width() - right_top_padding,
89 right_top_padding, 89 right_top_padding,
90 status_area_size.width(), 90 status_area_size.width(),
91 status_area_size.height()); 91 status_area_size.height());
92 } 92 }
93 93
94 void BackgroundView::ChildPreferredSizeChanged(View* child) {
95 Layout();
96 SchedulePaint();
97 }
98
94 gfx::NativeWindow BackgroundView::GetNativeWindow() const { 99 gfx::NativeWindow BackgroundView::GetNativeWindow() const {
95 return 100 return
96 GTK_WINDOW(static_cast<WidgetGtk*>(GetWidget())->GetNativeView()); 101 GTK_WINDOW(static_cast<WidgetGtk*>(GetWidget())->GetNativeView());
97 } 102 }
98 103
99 bool BackgroundView::ShouldOpenButtonOptions( 104 bool BackgroundView::ShouldOpenButtonOptions(
100 const views::View* button_view) const { 105 const views::View* button_view) const {
101 if (button_view == status_area_->clock_view() || 106 if (button_view == status_area_->clock_view() ||
102 button_view == status_area_->network_view()) { 107 button_view == status_area_->network_view()) {
103 return false; 108 return false;
(...skipping 19 matching lines...) Expand all
123 void BackgroundView::UpdateWindowType() { 128 void BackgroundView::UpdateWindowType() {
124 std::vector<int> params; 129 std::vector<int> params;
125 params.push_back(did_paint_ ? 1 : 0); 130 params.push_back(did_paint_ ? 1 : 0);
126 WmIpc::instance()->SetWindowType( 131 WmIpc::instance()->SetWindowType(
127 GTK_WIDGET(GetNativeWindow()), 132 GTK_WIDGET(GetNativeWindow()),
128 chromeos::WmIpc::WINDOW_TYPE_LOGIN_BACKGROUND, 133 chromeos::WmIpc::WINDOW_TYPE_LOGIN_BACKGROUND,
129 &params); 134 &params);
130 } 135 }
131 136
132 } // namespace chromeos 137 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698