summaryrefslogtreecommitdiffstats
path: root/views/window
diff options
context:
space:
mode:
authormiletus@chromium.org <miletus@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-06-02 21:32:47 +0000
committermiletus@chromium.org <miletus@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-06-02 21:32:47 +0000
commit66753957b436fff34ca3476e21b01c655c0c090e (patch)
treeaee786a1f25c9de94c4ec3f853ac1e8ea8b0edf5 /views/window
parentaa64c98f489e66d17342b7cb7e42c621b31cbbc7 (diff)
downloadchromium_src-66753957b436fff34ca3476e21b01c655c0c090e.zip
chromium_src-66753957b436fff34ca3476e21b01c655c0c090e.tar.gz
chromium_src-66753957b436fff34ca3476e21b01c655c0c090e.tar.bz2
Add some view class name to better debug view hierarchy
BUG=None TEST=None R= Review URL: http://codereview.chromium.org/6976053 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@87689 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views/window')
-rw-r--r--views/window/client_view.cc10
-rw-r--r--views/window/client_view.h6
2 files changed, 14 insertions, 2 deletions
diff --git a/views/window/client_view.cc b/views/window/client_view.cc
index cb52607..c91a6ae 100644
--- a/views/window/client_view.cc
+++ b/views/window/client_view.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -13,6 +13,10 @@
namespace views {
+// static
+const char ClientView::kViewClassName[] =
+ "views/window/ClientView";
+
///////////////////////////////////////////////////////////////////////////////
// ClientView, public:
@@ -54,6 +58,10 @@ void ClientView::Layout() {
contents_view_->SetBounds(0, 0, width(), height());
}
+std::string ClientView::GetClassName() const {
+ return kViewClassName;
+}
+
void ClientView::ViewHierarchyChanged(bool is_add, View* parent, View* child) {
if (is_add && child == this) {
DCHECK(GetWidget());
diff --git a/views/window/client_view.h b/views/window/client_view.h
index 052037f..cbfc3a6 100644
--- a/views/window/client_view.h
+++ b/views/window/client_view.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -23,6 +23,9 @@ class Window;
// "DialogClientView".
class ClientView : public View {
public:
+ // Internal class name
+ static const char kViewClassName[];
+
// Constructs a ClientView object for the specified window with the specified
// contents. Since this object is created during the process of creating
// |window|, |contents_view| must be valid if you want the initial size of
@@ -57,6 +60,7 @@ class ClientView : public View {
// Overridden from View:
virtual gfx::Size GetPreferredSize() OVERRIDE;
virtual void Layout() OVERRIDE;
+ virtual std::string GetClassName() const OVERRIDE;
protected:
// Overridden from View: