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

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

Issue 10051020: Move full-screen detection logic from PanelManager to DisplaySettingsProvider. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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.h" 5 #include "chrome/browser/ui/panels/panel.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "chrome/browser/extensions/extension_prefs.h" 8 #include "chrome/browser/extensions/extension_prefs.h"
9 #include "chrome/browser/extensions/extension_service.h" 9 #include "chrome/browser/extensions/extension_service.h"
10 #include "chrome/browser/profiles/profile.h" 10 #include "chrome/browser/profiles/profile.h"
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
225 225
226 bool Panel::IsDrawingAttention() const { 226 bool Panel::IsDrawingAttention() const {
227 return native_panel_->IsDrawingAttention(); 227 return native_panel_->IsDrawingAttention();
228 } 228 }
229 229
230 void Panel::FullScreenModeChanged(bool is_full_screen) { 230 void Panel::FullScreenModeChanged(bool is_full_screen) {
231 native_panel_->FullScreenModeChanged(is_full_screen); 231 native_panel_->FullScreenModeChanged(is_full_screen);
232 } 232 }
233 233
234 void Panel::Show() { 234 void Panel::Show() {
235 if (manager()->is_full_screen() || !panel_strip_) 235 if (manager()->display_settings_provider()->is_full_screen() || !panel_strip_)
236 return; 236 return;
237 237
238 if (panel_strip_->CanShowPanelAsActive(this)) 238 if (panel_strip_->CanShowPanelAsActive(this))
239 native_panel_->ShowPanel(); 239 native_panel_->ShowPanel();
240 else 240 else
241 ShowInactive(); 241 ShowInactive();
242 } 242 }
243 243
244 void Panel::ShowInactive() { 244 void Panel::ShowInactive() {
245 if (manager()->is_full_screen() || !panel_strip_) 245 if (manager()->display_settings_provider()->is_full_screen() || !panel_strip_)
246 return; 246 return;
247 247
248 native_panel_->ShowPanelInactive(); 248 native_panel_->ShowPanelInactive();
249 } 249 }
250 250
251 void Panel::SetBounds(const gfx::Rect& bounds) { 251 void Panel::SetBounds(const gfx::Rect& bounds) {
252 // Ignore bounds position as the panel manager controls all positioning. 252 // Ignore bounds position as the panel manager controls all positioning.
253 manager()->ResizePanel(this, bounds.size()); 253 manager()->ResizePanel(this, bounds.size());
254 } 254 }
255 255
(...skipping 490 matching lines...) Expand 10 before | Expand all | Expand 10 after
746 } 746 }
747 747
748 void Panel::OnTitlebarClicked(panel::ClickModifier modifier) { 748 void Panel::OnTitlebarClicked(panel::ClickModifier modifier) {
749 if (panel_strip_) 749 if (panel_strip_)
750 panel_strip_->OnPanelTitlebarClicked(this, modifier); 750 panel_strip_->OnPanelTitlebarClicked(this, modifier);
751 } 751 }
752 752
753 void Panel::DestroyBrowser() { 753 void Panel::DestroyBrowser() {
754 native_panel_->DestroyPanelBrowser(); 754 native_panel_->DestroyPanelBrowser();
755 } 755 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698