Commit 0de20ce1 authored by jianli@chromium.org's avatar jianli@chromium.org

Rename NativePanelStack to NativePanelStackWindow

We're going to change to use more than one background windows to enclose panels in the stack because not all panels are fully aligned when some of them are being dragged. The 'Window' suffix is added to the naming to make it clear.

BUG=223155
TEST=none due to no functionality change
TBR=thakis@chromium.org

Review URL: https://codereview.chromium.org/14188014

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@194666 0039d316-1c4b-4281-b951-d872f2087c98
parent ccf08103
...@@ -2,13 +2,13 @@ ...@@ -2,13 +2,13 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
#include "chrome/browser/ui/panels/native_panel_stack.h" #include "chrome/browser/ui/panels/native_panel_stack_window.h"
#include "base/logging.h" #include "base/logging.h"
// static // static
#if !defined(TOOLKIT_VIEWS) #if !defined(TOOLKIT_VIEWS)
NativePanelStack* NativePanelStack::Create( NativePanelStackWindow* NativePanelStackWindow::Create(
scoped_ptr<StackedPanelCollection> stack) { scoped_ptr<StackedPanelCollection> stack) {
NOTIMPLEMENTED(); NOTIMPLEMENTED();
return NULL; return NULL;
......
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
#ifndef CHROME_BROWSER_UI_PANELS_NATIVE_PANEL_STACK_H_ #ifndef CHROME_BROWSER_UI_PANELS_NATIVE_PANEL_STACK_WINDOW_H_
#define CHROME_BROWSER_UI_PANELS_NATIVE_PANEL_STACK_H_ #define CHROME_BROWSER_UI_PANELS_NATIVE_PANEL_STACK_WINDOW_H_
#include "base/memory/scoped_ptr.h" #include "base/memory/scoped_ptr.h"
...@@ -17,14 +17,16 @@ class Rect; ...@@ -17,14 +17,16 @@ class Rect;
// needed to support multiple panels that are stacked together. A native // needed to support multiple panels that are stacked together. A native
// window might be created to enclose all the panels in the stack. The lifetime // window might be created to enclose all the panels in the stack. The lifetime
// of the class that implements this interface is managed by itself. // of the class that implements this interface is managed by itself.
class NativePanelStack { class NativePanelStackWindow {
public: public:
// Creates and returns a NativePanelStack instance whose lifetime is managed // Creates and returns a NativePanelStackWindow instance whose lifetime is
// by itself and it will be valid until Close is called. NativePanelStack // managed by itself and it will be valid until Close is called.
// also owns the StackedPanelCollection instance being passed here. // NativePanelStackWindow also owns the StackedPanelCollection instance being
static NativePanelStack* Create(scoped_ptr<StackedPanelCollection> stack); // passed here.
static NativePanelStackWindow* Create(
scoped_ptr<StackedPanelCollection> stack);
virtual ~NativePanelStack() {} virtual ~NativePanelStackWindow() {}
virtual bool IsMinimized() const = 0; virtual bool IsMinimized() const = 0;
...@@ -32,7 +34,7 @@ class NativePanelStack { ...@@ -32,7 +34,7 @@ class NativePanelStack {
friend class StackedPanelCollection; friend class StackedPanelCollection;
// Called when the stack is to be closed. This will destruct the // Called when the stack is to be closed. This will destruct the
// NativePanelStack instance which causes the StackedPanelCollection // NativePanelStackWindow instance which causes the StackedPanelCollection
// instance to be also destructed since the former owns the later. // instance to be also destructed since the former owns the later.
virtual void Close() = 0; virtual void Close() = 0;
...@@ -50,4 +52,4 @@ class NativePanelStack { ...@@ -50,4 +52,4 @@ class NativePanelStack {
virtual void DrawSystemAttention(bool draw_attention) = 0; virtual void DrawSystemAttention(bool draw_attention) = 0;
}; };
#endif // CHROME_BROWSER_UI_PANELS_NATIVE_PANEL_STACK_H_ #endif // CHROME_BROWSER_UI_PANELS_NATIVE_PANEL_STACK_WINDOW_H_
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
#include "base/message_loop.h" #include "base/message_loop.h"
#include "chrome/browser/ui/panels/detached_panel_collection.h" #include "chrome/browser/ui/panels/detached_panel_collection.h"
#include "chrome/browser/ui/panels/docked_panel_collection.h" #include "chrome/browser/ui/panels/docked_panel_collection.h"
#include "chrome/browser/ui/panels/native_panel_stack.h" #include "chrome/browser/ui/panels/native_panel_stack_window.h"
#include "chrome/browser/ui/panels/panel_drag_controller.h" #include "chrome/browser/ui/panels/panel_drag_controller.h"
#include "chrome/browser/ui/panels/panel_mouse_watcher.h" #include "chrome/browser/ui/panels/panel_mouse_watcher.h"
#include "chrome/browser/ui/panels/panel_resize_controller.h" #include "chrome/browser/ui/panels/panel_resize_controller.h"
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
#include "base/logging.h" #include "base/logging.h"
#include "chrome/browser/ui/panels/detached_panel_collection.h" #include "chrome/browser/ui/panels/detached_panel_collection.h"
#include "chrome/browser/ui/panels/display_settings_provider.h" #include "chrome/browser/ui/panels/display_settings_provider.h"
#include "chrome/browser/ui/panels/native_panel_stack.h" #include "chrome/browser/ui/panels/native_panel_stack_window.h"
#include "chrome/browser/ui/panels/panel.h" #include "chrome/browser/ui/panels/panel.h"
#include "chrome/browser/ui/panels/panel_constants.h" #include "chrome/browser/ui/panels/panel_constants.h"
#include "chrome/browser/ui/panels/panel_manager.h" #include "chrome/browser/ui/panels/panel_manager.h"
...@@ -19,7 +19,7 @@ StackedPanelCollection::StackedPanelCollection(PanelManager* panel_manager) ...@@ -19,7 +19,7 @@ StackedPanelCollection::StackedPanelCollection(PanelManager* panel_manager)
panel_manager_(panel_manager), panel_manager_(panel_manager),
native_stack_(NULL), native_stack_(NULL),
minimizing_all_(false) { minimizing_all_(false) {
native_stack_ = NativePanelStack::Create(make_scoped_ptr(this).Pass()); native_stack_ = NativePanelStackWindow::Create(make_scoped_ptr(this).Pass());
} }
StackedPanelCollection::~StackedPanelCollection() { StackedPanelCollection::~StackedPanelCollection() {
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
#include "chrome/browser/ui/panels/panel_constants.h" #include "chrome/browser/ui/panels/panel_constants.h"
#include "ui/gfx/rect.h" #include "ui/gfx/rect.h"
class NativePanelStack; class NativePanelStackWindow;
class PanelManager; class PanelManager;
namespace gfx { namespace gfx {
class Vector2d; class Vector2d;
...@@ -71,7 +71,7 @@ class StackedPanelCollection : public PanelCollection { ...@@ -71,7 +71,7 @@ class StackedPanelCollection : public PanelCollection {
// panels are collapsed. // panels are collapsed.
int GetMaximiumAvailableBottomSpace() const; int GetMaximiumAvailableBottomSpace() const;
NativePanelStack* native_stack() const { return native_stack_; } NativePanelStackWindow* native_stack() const { return native_stack_; }
int num_panels() const { return panels_.size(); } int num_panels() const { return panels_.size(); }
const Panels& panels() const { return panels_; } const Panels& panels() const { return panels_; }
Panel* top_panel() const { return panels_.empty() ? NULL : panels_.front(); } Panel* top_panel() const { return panels_.empty() ? NULL : panels_.front(); }
...@@ -130,7 +130,7 @@ class StackedPanelCollection : public PanelCollection { ...@@ -130,7 +130,7 @@ class StackedPanelCollection : public PanelCollection {
PanelManager* panel_manager_; PanelManager* panel_manager_;
NativePanelStack* native_stack_; // Weak, owns us. NativePanelStackWindow* native_stack_; // Weak, owns us.
Panels panels_; // The top panel is in the front of the list. Panels panels_; // The top panel is in the front of the list.
......
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
#endif #endif
// static // static
NativePanelStack* NativePanelStack::Create( NativePanelStackWindow* NativePanelStackWindow::Create(
scoped_ptr<StackedPanelCollection> stacked_collection) { scoped_ptr<StackedPanelCollection> stacked_collection) {
#if defined(OS_WIN) #if defined(OS_WIN)
return new PanelStackView(stacked_collection.Pass()); return new PanelStackView(stacked_collection.Pass());
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
#include "base/basictypes.h" #include "base/basictypes.h"
#include "base/memory/scoped_ptr.h" #include "base/memory/scoped_ptr.h"
#include "chrome/browser/ui/panels/native_panel_stack.h" #include "chrome/browser/ui/panels/native_panel_stack_window.h"
#include "ui/views/focus/widget_focus_manager.h" #include "ui/views/focus/widget_focus_manager.h"
#include "ui/views/widget/widget_delegate.h" #include "ui/views/widget/widget_delegate.h"
#include "ui/views/widget/widget_observer.h" #include "ui/views/widget/widget_observer.h"
...@@ -17,7 +17,7 @@ class TaskbarWindowThumbnailerWin; ...@@ -17,7 +17,7 @@ class TaskbarWindowThumbnailerWin;
// A native window that acts as the owner of all panels in the stack, in order // A native window that acts as the owner of all panels in the stack, in order
// to make all panels appear as a single window on the taskbar or launcher. // to make all panels appear as a single window on the taskbar or launcher.
class PanelStackView : public NativePanelStack, class PanelStackView : public NativePanelStackWindow,
public views::WidgetObserver, public views::WidgetObserver,
public views::WidgetDelegateView, public views::WidgetDelegateView,
public views::WidgetFocusChangeListener { public views::WidgetFocusChangeListener {
...@@ -27,7 +27,7 @@ class PanelStackView : public NativePanelStack, ...@@ -27,7 +27,7 @@ class PanelStackView : public NativePanelStack,
virtual ~PanelStackView(); virtual ~PanelStackView();
protected: protected:
// Overridden from NativePanelStack: // Overridden from NativePanelStackWindow:
virtual void Close() OVERRIDE; virtual void Close() OVERRIDE;
virtual void OnPanelAddedOrRemoved(Panel* panel) OVERRIDE; virtual void OnPanelAddedOrRemoved(Panel* panel) OVERRIDE;
virtual void SetBounds(const gfx::Rect& bounds) OVERRIDE; virtual void SetBounds(const gfx::Rect& bounds) OVERRIDE;
......
...@@ -1231,8 +1231,8 @@ ...@@ -1231,8 +1231,8 @@
'browser/ui/panels/docked_panel_drag_handler.cc', 'browser/ui/panels/docked_panel_drag_handler.cc',
'browser/ui/panels/docked_panel_drag_handler.h', 'browser/ui/panels/docked_panel_drag_handler.h',
'browser/ui/panels/native_panel.h', 'browser/ui/panels/native_panel.h',
'browser/ui/panels/native_panel_stack.cc', 'browser/ui/panels/native_panel_stack_window.cc',
'browser/ui/panels/native_panel_stack.h', 'browser/ui/panels/native_panel_stack_window.h',
'browser/ui/panels/panel.cc', 'browser/ui/panels/panel.cc',
'browser/ui/panels/panel.h', 'browser/ui/panels/panel.h',
'browser/ui/panels/panel_bounds_animation.cc', 'browser/ui/panels/panel_bounds_animation.cc',
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment