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

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

Issue 8686012: Make panels not show on top when there is an app running in full screen mode. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years 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/ui/panels/panel_browser_view.h" 5 #include "chrome/browser/ui/panels/panel_browser_view.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "chrome/browser/ui/panels/panel.h" 9 #include "chrome/browser/ui/panels/panel.h"
10 #include "chrome/browser/ui/panels/panel_browser_frame_view.h" 10 #include "chrome/browser/ui/panels/panel_browser_frame_view.h"
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 mouse_dragging_state_(NO_DRAGGING), 53 mouse_dragging_state_(NO_DRAGGING),
54 is_drawing_attention_(false), 54 is_drawing_attention_(false),
55 old_focused_view_(NULL) { 55 old_focused_view_(NULL) {
56 } 56 }
57 57
58 PanelBrowserView::~PanelBrowserView() { 58 PanelBrowserView::~PanelBrowserView() {
59 panel_->OnNativePanelClosed(); 59 panel_->OnNativePanelClosed();
60 } 60 }
61 61
62 void PanelBrowserView::Init() { 62 void PanelBrowserView::Init() {
63 if (!panel_->manager()->is_full_screen_mode_on()) {
64 // TODO(prasadt): Implement this code.
65 // Turn off always on top for the panel.
jianli 2011/11/30 01:53:15 Can you update the comment and all others to indic
prasadt 2011/11/30 02:38:47 Done.
66 }
67
63 BrowserView::Init(); 68 BrowserView::Init();
64 69
65 GetWidget()->non_client_view()->SetAccessibleName( 70 GetWidget()->non_client_view()->SetAccessibleName(
66 l10n_util::GetStringUTF16(IDS_PRODUCT_NAME)); 71 l10n_util::GetStringUTF16(IDS_PRODUCT_NAME));
67 } 72 }
68 73
69 void PanelBrowserView::Close() { 74 void PanelBrowserView::Close() {
70 GetWidget()->RemoveObserver(this); 75 GetWidget()->RemoveObserver(this);
71 closed_ = true; 76 closed_ = true;
72 77
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after
339 344
340 GetFrameView()->SchedulePaint(); 345 GetFrameView()->SchedulePaint();
341 } 346 }
342 347
343 bool PanelBrowserView::PreHandlePanelKeyboardEvent( 348 bool PanelBrowserView::PreHandlePanelKeyboardEvent(
344 const NativeWebKeyboardEvent& event, 349 const NativeWebKeyboardEvent& event,
345 bool* is_keyboard_shortcut) { 350 bool* is_keyboard_shortcut) {
346 return PreHandleKeyboardEvent(event, is_keyboard_shortcut); 351 return PreHandleKeyboardEvent(event, is_keyboard_shortcut);
347 } 352 }
348 353
354 void PanelBrowserView::FullScreenModeChanged(bool is_full_screen_mode_on) {
355 // TODO(prasadt): Enable this code.
356 // if (is_full_screen_mode_on)
357 // TurnOnAlwaysOnTop.
358 // else
359 // TurnOffAlwaysOnTop.
360 }
361
349 void PanelBrowserView::HandlePanelKeyboardEvent( 362 void PanelBrowserView::HandlePanelKeyboardEvent(
350 const NativeWebKeyboardEvent& event) { 363 const NativeWebKeyboardEvent& event) {
351 HandleKeyboardEvent(event); 364 HandleKeyboardEvent(event);
352 } 365 }
353 366
354 gfx::Size PanelBrowserView::WindowSizeFromContentSize( 367 gfx::Size PanelBrowserView::WindowSizeFromContentSize(
355 const gfx::Size& content_size) const { 368 const gfx::Size& content_size) const {
356 gfx::Size frame = GetFrameView()->NonClientAreaSize(); 369 gfx::Size frame = GetFrameView()->NonClientAreaSize();
357 return gfx::Size(content_size.width() + frame.width(), 370 return gfx::Size(content_size.width() + frame.width(),
358 content_size.height() + frame.height()); 371 content_size.height() + frame.height());
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
556 } 569 }
557 570
558 bool NativePanelTestingWin::IsWindowSizeKnown() const { 571 bool NativePanelTestingWin::IsWindowSizeKnown() const {
559 return true; 572 return true;
560 } 573 }
561 574
562 bool NativePanelTestingWin::IsAnimatingBounds() const { 575 bool NativePanelTestingWin::IsAnimatingBounds() const {
563 return panel_browser_view_->bounds_animator_.get() && 576 return panel_browser_view_->bounds_animator_.get() &&
564 panel_browser_view_->bounds_animator_->is_animating(); 577 panel_browser_view_->bounds_animator_->is_animating();
565 } 578 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698