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

Side by Side Diff: chrome/browser/chromeos/frame/panel_controller.cc

Issue 7129033: Adding a new window type for frameless non-transient top level windows, used by ChromeOS' window ... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 6 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/frame/panel_controller.h" 5 #include "chrome/browser/chromeos/frame/panel_controller.h"
6 6
7 #if defined(TOUCH_UI) 7 #if defined(TOUCH_UI)
8 #include <X11/Xlib.h> 8 #include <X11/Xlib.h>
9 #if defined(HAVE_XINPUT2) 9 #if defined(HAVE_XINPUT2)
10 #include <X11/extensions/XInput2.h> 10 #include <X11/extensions/XInput2.h>
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 urgent_(false) { 177 urgent_(false) {
178 } 178 }
179 179
180 void PanelController::Init(bool initial_focus, 180 void PanelController::Init(bool initial_focus,
181 const gfx::Rect& window_bounds, 181 const gfx::Rect& window_bounds,
182 XID creator_xid, 182 XID creator_xid,
183 WmIpcPanelUserResizeType resize_type) { 183 WmIpcPanelUserResizeType resize_type) {
184 gfx::Rect title_bounds(0, 0, window_bounds.width(), kTitleHeight); 184 gfx::Rect title_bounds(0, 0, window_bounds.width(), kTitleHeight);
185 185
186 title_window_ = new views::Widget; 186 title_window_ = new views::Widget;
187 views::Widget::InitParams params(views::Widget::InitParams::TYPE_POPUP); 187 views::Widget::InitParams params(
188 views::Widget::InitParams::TYPE_WINDOW_FRAMELESS);
188 params.transparent = true; 189 params.transparent = true;
189 params.bounds = title_bounds; 190 params.bounds = title_bounds;
190 title_window_->Init(params); 191 title_window_->Init(params);
191 gtk_widget_set_size_request(title_window_->GetNativeView(), 192 gtk_widget_set_size_request(title_window_->GetNativeView(),
192 title_bounds.width(), title_bounds.height()); 193 title_bounds.width(), title_bounds.height());
193 title_ = title_window_->GetNativeView(); 194 title_ = title_window_->GetNativeView();
194 title_xid_ = ui::GetX11WindowFromGtkWidget(title_); 195 title_xid_ = ui::GetX11WindowFromGtkWidget(title_);
195 196
196 WmIpc::instance()->SetWindowType( 197 WmIpc::instance()->SetWindowType(
197 title_, 198 title_,
(...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after
506 views::Button* sender, const views::Event& event) { 507 views::Button* sender, const views::Event& event) {
507 if (panel_controller_ && sender == close_button_) 508 if (panel_controller_ && sender == close_button_)
508 panel_controller_->OnCloseButtonPressed(); 509 panel_controller_->OnCloseButtonPressed();
509 } 510 }
510 511
511 PanelController::TitleContentView::~TitleContentView() { 512 PanelController::TitleContentView::~TitleContentView() {
512 VLOG(1) << "panel: delete " << this; 513 VLOG(1) << "panel: delete " << this;
513 } 514 }
514 515
515 } // namespace chromeos 516 } // namespace chromeos
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chromeos/login/background_view.cc » ('j') | views/widget/native_widget_gtk.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698