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

Side by Side Diff: chrome/browser/ui/panels/panel_browser_view.cc

Issue 7104067: Make PanelBrowserView derive from NativePanel. Also add some more methods to NativePanel. (Closed) Base URL: svn://chrome-svn/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
« no previous file with comments | « chrome/browser/ui/panels/panel_browser_view.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/ui/panels/panel_browser_view.h" 5 #include "chrome/browser/ui/panels/panel_browser_view.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "chrome/browser/ui/panels/panel.h" 8 #include "chrome/browser/ui/panels/panel.h"
9 #include "chrome/browser/ui/panels/panel_browser_frame_view.h" 9 #include "chrome/browser/ui/panels/panel_browser_frame_view.h"
10 #include "chrome/browser/ui/panels/panel_manager.h" 10 #include "chrome/browser/ui/panels/panel_manager.h"
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 111
112 void PanelBrowserView::OnWorkAreaChanged() { 112 void PanelBrowserView::OnWorkAreaChanged() {
113 BrowserView::OnWorkAreaChanged(); 113 BrowserView::OnWorkAreaChanged();
114 panel_->manager()->OnDisplayChanged(); 114 panel_->manager()->OnDisplayChanged();
115 } 115 }
116 116
117 bool PanelBrowserView::WillProcessWorkAreaChange() const { 117 bool PanelBrowserView::WillProcessWorkAreaChange() const {
118 return true; 118 return true;
119 } 119 }
120 120
121 void PanelBrowserView::ShowPanel() {
122 Show();
123 }
124
125 void PanelBrowserView::SetPanelBounds(const gfx::Rect& bounds) {
126 SetBounds(bounds);
127 }
128
129 void PanelBrowserView::MinimizePanel() {
130 NOTIMPLEMENTED();
131 }
132
133 void PanelBrowserView::RestorePanel() {
134 NOTIMPLEMENTED();
135 }
136
137 void PanelBrowserView::ClosePanel() {
138 Close();
139 }
140
141 void PanelBrowserView::ActivatePanel() {
142 Activate();
143 }
144
145 void PanelBrowserView::DeactivatePanel() {
146 Deactivate();
147 }
148
149 bool PanelBrowserView::IsPanelActive() const {
150 return IsActive();
151 }
152
153 gfx::NativeWindow PanelBrowserView::GetNativePanelHandle() {
154 return GetNativeHandle();
155 }
156
157 void PanelBrowserView::UpdatePanelTitleBar() {
158 UpdateTitleBar();
159 }
160
161 void PanelBrowserView::ShowTaskManagerForPanel() {
162 ShowTaskManager();
163 }
164
165 void PanelBrowserView::NotifyPanelOnUserChangedTheme() {
166 UserChangedTheme();
167 }
168
169 void PanelBrowserView::FlashPanelFrame() {
170 FlashFrame();
171 }
172
173 void PanelBrowserView::DestroyPanelBrowser() {
174 DestroyBrowser();
175 }
176
121 PanelBrowserFrameView* PanelBrowserView::GetFrameView() const { 177 PanelBrowserFrameView* PanelBrowserView::GetFrameView() const {
122 return static_cast<PanelBrowserFrameView*>(frame()->GetFrameView()); 178 return static_cast<PanelBrowserFrameView*>(frame()->GetFrameView());
123 } 179 }
124 180
125 bool PanelBrowserView::OnTitleBarMousePressed(const views::MouseEvent& event) { 181 bool PanelBrowserView::OnTitleBarMousePressed(const views::MouseEvent& event) {
126 if (!event.IsOnlyLeftMouseButton()) 182 if (!event.IsOnlyLeftMouseButton())
127 return false; 183 return false;
128 mouse_pressed_ = true; 184 mouse_pressed_ = true;
129 mouse_pressed_point_ = event.location(); 185 mouse_pressed_point_ = event.location();
130 mouse_dragging_ = false; 186 mouse_dragging_ = false;
(...skipping 27 matching lines...) Expand all
158 if (!mouse_pressed_) 214 if (!mouse_pressed_)
159 return false; 215 return false;
160 mouse_pressed_ = false; 216 mouse_pressed_ = false;
161 217
162 if (!mouse_dragging_) 218 if (!mouse_dragging_)
163 cancelled = true; 219 cancelled = true;
164 mouse_dragging_ = false; 220 mouse_dragging_ = false;
165 panel_->manager()->EndDragging(cancelled); 221 panel_->manager()->EndDragging(cancelled);
166 return true; 222 return true;
167 } 223 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/panels/panel_browser_view.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698