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

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

Issue 7327007: Moving notification types which are chrome specific to a new header file chrome_notification_type... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 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) 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 371 matching lines...) Expand 10 before | Expand all | Expand 10 after
382 382
383 bool PanelController::PanelClientEvent(GdkEventClient* event) { 383 bool PanelController::PanelClientEvent(GdkEventClient* event) {
384 WmIpc::Message msg; 384 WmIpc::Message msg;
385 WmIpc::instance()->DecodeMessage(*event, &msg); 385 WmIpc::instance()->DecodeMessage(*event, &msg);
386 if (msg.type() == WM_IPC_MESSAGE_CHROME_NOTIFY_PANEL_STATE) { 386 if (msg.type() == WM_IPC_MESSAGE_CHROME_NOTIFY_PANEL_STATE) {
387 bool new_state = msg.param(0); 387 bool new_state = msg.param(0);
388 if (expanded_ != new_state) { 388 if (expanded_ != new_state) {
389 expanded_ = new_state; 389 expanded_ = new_state;
390 State state = new_state ? EXPANDED : MINIMIZED; 390 State state = new_state ? EXPANDED : MINIMIZED;
391 NotificationService::current()->Notify( 391 NotificationService::current()->Notify(
392 NotificationType::PANEL_STATE_CHANGED, 392 chrome::PANEL_STATE_CHANGED,
393 Source<PanelController>(this), 393 Source<PanelController>(this),
394 Details<State>(&state)); 394 Details<State>(&state));
395 } 395 }
396 } 396 }
397 return true; 397 return true;
398 } 398 }
399 399
400 void PanelController::Close() { 400 void PanelController::Close() {
401 if (client_event_handler_id_ > 0) { 401 if (client_event_handler_id_ > 0) {
402 g_signal_handler_disconnect(panel_, client_event_handler_id_); 402 g_signal_handler_disconnect(panel_, client_event_handler_id_);
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
511 views::Button* sender, const views::Event& event) { 511 views::Button* sender, const views::Event& event) {
512 if (panel_controller_ && sender == close_button_) 512 if (panel_controller_ && sender == close_button_)
513 panel_controller_->OnCloseButtonPressed(); 513 panel_controller_->OnCloseButtonPressed();
514 } 514 }
515 515
516 PanelController::TitleContentView::~TitleContentView() { 516 PanelController::TitleContentView::~TitleContentView() {
517 VLOG(1) << "panel: delete " << this; 517 VLOG(1) << "panel: delete " << this;
518 } 518 }
519 519
520 } // namespace chromeos 520 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698