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

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

Issue 6685069: Disambiguate OnMouseCaptureLost from OnMouseReleased, etc. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comments, fix tests, cleanup, etc. Created 9 years, 9 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) 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 #ifndef CHROME_BROWSER_CHROMEOS_FRAME_PANEL_CONTROLLER_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_FRAME_PANEL_CONTROLLER_H_
6 #define CHROME_BROWSER_CHROMEOS_FRAME_PANEL_CONTROLLER_H_ 6 #define CHROME_BROWSER_CHROMEOS_FRAME_PANEL_CONTROLLER_H_
7 #pragma once 7 #pragma once
8 8
9 #include <gtk/gtk.h> 9 #include <gtk/gtk.h>
10 10
11 #include "third_party/cros/chromeos_wm_ipc_enums.h" 11 #include "third_party/cros/chromeos_wm_ipc_enums.h"
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 PanelController(Delegate* delegate_window, 55 PanelController(Delegate* delegate_window,
56 GtkWindow* window); 56 GtkWindow* window);
57 virtual ~PanelController() {} 57 virtual ~PanelController() {}
58 58
59 // Initializes the panel controller with the initial state of the focus and 59 // Initializes the panel controller with the initial state of the focus and
60 // the window bounds. 60 // the window bounds.
61 void Init(bool initial_focus, const gfx::Rect& init_bounds, XID creator_xid, 61 void Init(bool initial_focus, const gfx::Rect& init_bounds, XID creator_xid,
62 WmIpcPanelUserResizeType resize_type); 62 WmIpcPanelUserResizeType resize_type);
63 63
64 bool TitleMousePressed(const views::MouseEvent& event); 64 bool TitleMousePressed(const views::MouseEvent& event);
65 void TitleMouseReleased(const views::MouseEvent& event, bool canceled); 65 void TitleMouseReleased(const views::MouseEvent& event);
66 void TitleMouseCaptureLost();
66 bool TitleMouseDragged(const views::MouseEvent& event); 67 bool TitleMouseDragged(const views::MouseEvent& event);
67 bool PanelClientEvent(GdkEventClient* event); 68 bool PanelClientEvent(GdkEventClient* event);
68 void OnFocusIn(); 69 void OnFocusIn();
69 void OnFocusOut(); 70 void OnFocusOut();
70 71
71 void UpdateTitleBar(); 72 void UpdateTitleBar();
72 void Close(); 73 void Close();
73 74
74 void SetState(State state); 75 void SetState(State state);
75 76
76 private: 77 private:
77 class TitleContentView : public views::View, 78 class TitleContentView : public views::View,
78 public views::ButtonListener { 79 public views::ButtonListener {
79 public: 80 public:
80 explicit TitleContentView(PanelController* panelController); 81 explicit TitleContentView(PanelController* panelController);
81 virtual ~TitleContentView(); 82 virtual ~TitleContentView();
82 virtual void Layout(); 83
83 virtual bool OnMousePressed(const views::MouseEvent& event); 84 // Overridden from View:
84 virtual void OnMouseReleased(const views::MouseEvent& event, bool canceled); 85 virtual void Layout() OVERRIDE;
85 virtual bool OnMouseDragged(const views::MouseEvent& event); 86 virtual bool OnMousePressed(const views::MouseEvent& event) OVERRIDE;
87 virtual void OnMouseReleased(const views::MouseEvent& event) OVERRIDE;
88 virtual void OnMouseCaptureLost() OVERRIDE;
89 virtual bool OnMouseDragged(const views::MouseEvent& event) OVERRIDE;
90
86 void OnFocusIn(); 91 void OnFocusIn();
87 void OnFocusOut(); 92 void OnFocusOut();
88 void OnClose(); 93 void OnClose();
89 94
90 views::ImageView* title_icon() { return title_icon_; } 95 views::ImageView* title_icon() { return title_icon_; }
91 views::Label* title_label() { return title_label_; } 96 views::Label* title_label() { return title_label_; }
92 views::ImageButton* close_button() { return close_button_; } 97 views::ImageButton* close_button() { return close_button_; }
93 98
94 // ButtonListener methods. 99 // ButtonListener methods.
95 virtual void ButtonPressed(views::Button* sender, 100 virtual void ButtonPressed(views::Button* sender,
96 const views::Event& event); 101 const views::Event& event) OVERRIDE;
97 private: 102 private:
98 views::ImageView* title_icon_; 103 views::ImageView* title_icon_;
99 views::Label* title_label_; 104 views::Label* title_label_;
100 views::ImageButton* close_button_; 105 views::ImageButton* close_button_;
101 PanelController* panel_controller_; 106 PanelController* panel_controller_;
102 DISALLOW_COPY_AND_ASSIGN(TitleContentView); 107 DISALLOW_COPY_AND_ASSIGN(TitleContentView);
103 }; 108 };
104 109
105 // Called from TitleContentView's ButtonPressed handler. 110 // Called from TitleContentView's ButtonPressed handler.
106 void OnCloseButtonPressed(); 111 void OnCloseButtonPressed();
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 155
151 // GTK client event handler id. 156 // GTK client event handler id.
152 int client_event_handler_id_; 157 int client_event_handler_id_;
153 158
154 DISALLOW_COPY_AND_ASSIGN(PanelController); 159 DISALLOW_COPY_AND_ASSIGN(PanelController);
155 }; 160 };
156 161
157 } // namespace chromeos 162 } // namespace chromeos
158 163
159 #endif // CHROME_BROWSER_CHROMEOS_FRAME_PANEL_CONTROLLER_H_ 164 #endif // CHROME_BROWSER_CHROMEOS_FRAME_PANEL_CONTROLLER_H_
OLDNEW
« no previous file with comments | « chrome/browser/automation/automation_provider_win.cc ('k') | chrome/browser/chromeos/frame/panel_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698