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

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: Fix linux asan 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 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
228 228
229 bool Panel::IsDrawingAttention() const { 229 bool Panel::IsDrawingAttention() const {
230 return native_panel_->IsDrawingAttention(); 230 return native_panel_->IsDrawingAttention();
231 } 231 }
232 232
233 void Panel::FullScreenModeChanged(bool is_full_screen) { 233 void Panel::FullScreenModeChanged(bool is_full_screen) {
234 native_panel_->FullScreenModeChanged(is_full_screen); 234 native_panel_->FullScreenModeChanged(is_full_screen);
235 } 235 }
236 236
237 void Panel::Show() { 237 void Panel::Show() {
238 if (manager()->is_full_screen() || !panel_strip_) 238 if (manager()->display_settings_provider()->is_full_screen() || !panel_strip_)
239 return; 239 return;
240 240
241 if (panel_strip_->CanShowPanelAsActive(this)) 241 if (panel_strip_->CanShowPanelAsActive(this))
242 native_panel_->ShowPanel(); 242 native_panel_->ShowPanel();
243 else 243 else
244 ShowInactive(); 244 ShowInactive();
245 } 245 }
246 246
247 void Panel::ShowInactive() { 247 void Panel::ShowInactive() {
248 if (manager()->is_full_screen() || !panel_strip_) 248 if (manager()->display_settings_provider()->is_full_screen() || !panel_strip_)
249 return; 249 return;
250 250
251 native_panel_->ShowPanelInactive(); 251 native_panel_->ShowPanelInactive();
252 } 252 }
253 253
254 void Panel::SetBounds(const gfx::Rect& bounds) { 254 void Panel::SetBounds(const gfx::Rect& bounds) {
255 // Ignore bounds position as the panel manager controls all positioning. 255 // Ignore bounds position as the panel manager controls all positioning.
256 manager()->ResizePanel(this, bounds.size()); 256 manager()->ResizePanel(this, bounds.size());
257 } 257 }
258 258
(...skipping 490 matching lines...) Expand 10 before | Expand all | Expand 10 after
749 } 749 }
750 750
751 void Panel::OnTitlebarClicked(panel::ClickModifier modifier) { 751 void Panel::OnTitlebarClicked(panel::ClickModifier modifier) {
752 if (panel_strip_) 752 if (panel_strip_)
753 panel_strip_->OnPanelTitlebarClicked(this, modifier); 753 panel_strip_->OnPanelTitlebarClicked(this, modifier);
754 } 754 }
755 755
756 void Panel::DestroyBrowser() { 756 void Panel::DestroyBrowser() {
757 native_panel_->DestroyPanelBrowser(); 757 native_panel_->DestroyPanelBrowser();
758 } 758 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/panels/overflow_panel_strip.cc ('k') | chrome/browser/ui/panels/panel_browser_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698