diff options
author | pfeldman@chromium.org <pfeldman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-05-20 14:42:01 +0000 |
---|---|---|
committer | pfeldman@chromium.org <pfeldman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-05-20 14:42:01 +0000 |
commit | 6795fc9ec17687981f7dce87dfb9139f532c2816 (patch) | |
tree | a078d1f61dc7f68d54ba1ad6b93ad7bc5ce2f780 /chrome/browser/debugger/devtools_window_win.cc | |
parent | 02f49d56563b5a9b49463e6818cb6c79b858e5c3 (diff) | |
download | chromium_src-6795fc9ec17687981f7dce87dfb9139f532c2816.zip chromium_src-6795fc9ec17687981f7dce87dfb9139f532c2816.tar.gz chromium_src-6795fc9ec17687981f7dce87dfb9139f532c2816.tar.bz2 |
DevTools: Get rid of views in DevTools.
Review URL: http://codereview.chromium.org/115562
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16481 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/debugger/devtools_window_win.cc')
-rw-r--r-- | chrome/browser/debugger/devtools_window_win.cc | 94 |
1 files changed, 0 insertions, 94 deletions
diff --git a/chrome/browser/debugger/devtools_window_win.cc b/chrome/browser/debugger/devtools_window_win.cc deleted file mode 100644 index 559016a..0000000 --- a/chrome/browser/debugger/devtools_window_win.cc +++ /dev/null @@ -1,94 +0,0 @@ -// Copyright (c) 2009 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. - -#include "chrome/browser/debugger/devtools_window_win.h" - -#include "app/l10n_util.h" -#include "chrome/browser/debugger/devtools_manager.h" -#include "chrome/browser/debugger/devtools_view.h" -#include "chrome/browser/debugger/devtools_window.h" -#include "views/window/window.h" -#include "grit/generated_resources.h" - -// static -DevToolsWindow* DevToolsWindow::Create(Profile* profile) { - DevToolsView* view = new DevToolsView(profile); - DevToolsWindowWin* window = new DevToolsWindowWin(view); - views::Window::CreateChromeWindow(NULL, gfx::Rect(), window); - return window; -} - -DevToolsWindowWin::DevToolsWindowWin(DevToolsView* view) - : DevToolsWindow(), - tools_view_(view) { -} - -DevToolsWindowWin::~DevToolsWindowWin() { - DCHECK(!tools_view_); -} - -void DevToolsWindowWin::Show() { - if (window()) { - window()->Show(); - } else { - NOTREACHED(); - } -} - -RenderViewHost* DevToolsWindowWin::GetRenderViewHost() const { - if (tools_view_) { - return tools_view_->GetRenderViewHost(); - } - return NULL; -} - -void DevToolsWindowWin::InspectedTabClosing() { - if (window()) { - window()->Close(); - } else { - NOTREACHED(); - } -} - -void DevToolsWindowWin::SetInspectedTabUrl(const std::string& url) { - inspected_url_ = url; - if (window()) { - window()->UpdateWindowTitle(); - } -} - -void DevToolsWindowWin::SendMessageToClient(const IPC::Message& message) { - if (tools_view_) { - tools_view_->SendMessageToClient(message); - } -} - -std::wstring DevToolsWindowWin::GetWindowTitle() const { - return l10n_util::GetStringF(IDS_DEVTOOLS_TITLE, UTF8ToWide(inspected_url_)); -} - -void DevToolsWindowWin::WindowClosing() { - if (tools_view_) { - NotifyCloseListener(); - - ReleaseWindow(); - tools_view_->OnWindowClosing(); - tools_view_ = NULL; - } else { - NOTREACHED() << "WindowClosing called twice."; - } -} - -bool DevToolsWindowWin::CanResize() const { - return true; -} - -views::View* DevToolsWindowWin::GetContentsView() { - return tools_view_; -} - -void DevToolsWindowWin::DeleteDelegate() { - DCHECK(!tools_view_) << "WindowClosing should have been called."; - delete this; -} |