diff options
author | apavlov@chromium.org <apavlov@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-12-25 11:22:46 +0000 |
---|---|---|
committer | apavlov@chromium.org <apavlov@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-12-25 11:22:46 +0000 |
commit | 8e48e9848e1a6626c36e3efbe1750bbb3c8b3e4e (patch) | |
tree | 344faabdd8f1fe715c6d919de4a1d53bde344dbb /chrome/browser/debugger | |
parent | 09c0077246c9be4122ca1fcbf892865a61ec12a8 (diff) | |
download | chromium_src-8e48e9848e1a6626c36e3efbe1750bbb3c8b3e4e.zip chromium_src-8e48e9848e1a6626c36e3efbe1750bbb3c8b3e4e.tar.gz chromium_src-8e48e9848e1a6626c36e3efbe1750bbb3c8b3e4e.tar.bz2 |
Forbid reloading the Inspector window.
This CL disables reloading from the system menu, tab popup menu, and page context menu.
BUG=27254,6902
TEST=none
Review URL: http://codereview.chromium.org/391036
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@35275 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/debugger')
-rw-r--r-- | chrome/browser/debugger/devtools_window.cc | 5 | ||||
-rw-r--r-- | chrome/browser/debugger/devtools_window.h | 2 |
2 files changed, 5 insertions, 2 deletions
diff --git a/chrome/browser/debugger/devtools_window.cc b/chrome/browser/debugger/devtools_window.cc index 273ab4e..0eaccdd 100644 --- a/chrome/browser/debugger/devtools_window.cc +++ b/chrome/browser/debugger/devtools_window.cc @@ -24,6 +24,7 @@ #include "chrome/common/url_constants.h" #include "grit/generated_resources.h" +const std::wstring DevToolsWindow::kDevToolsApp = L"DevToolsApp"; // static TabContents* DevToolsWindow::GetDevToolsContents(TabContents* inspected_tab) { @@ -175,7 +176,7 @@ void DevToolsWindow::CreateDevToolsBrowser() { std::wstring wp_key = L""; wp_key.append(prefs::kBrowserWindowPlacement); wp_key.append(L"_"); - wp_key.append(L"DevToolsApp"); + wp_key.append(kDevToolsApp); PrefService* prefs = g_browser_process->local_state(); if (!prefs->FindPreference(wp_key.c_str())) { @@ -193,7 +194,7 @@ void DevToolsWindow::CreateDevToolsBrowser() { defaults->SetBoolean(L"always_on_top", false); } - browser_ = Browser::CreateForApp(L"DevToolsApp", profile_, false); + browser_ = Browser::CreateForDevTools(profile_); browser_->tabstrip_model()->AddTabContents( tab_contents_, -1, false, PageTransition::START_PAGE, true); } diff --git a/chrome/browser/debugger/devtools_window.h b/chrome/browser/debugger/devtools_window.h index f583327..5350934 100644 --- a/chrome/browser/debugger/devtools_window.h +++ b/chrome/browser/debugger/devtools_window.h @@ -29,6 +29,7 @@ class DevToolsWindow public NotificationObserver, public TabContentsDelegate { public: + static const std::wstring kDevToolsApp; static TabContents* GetDevToolsContents(TabContents* inspected_tab); DevToolsWindow(Profile* profile, RenderViewHost* inspected_rvh, bool docked); @@ -77,6 +78,7 @@ class DevToolsWindow virtual void CloseContents(TabContents* source) {} virtual void MoveContents(TabContents* source, const gfx::Rect& pos) {} virtual bool IsPopup(TabContents* source) { return false; } + virtual bool CanReloadContents(TabContents* source) const { return false; } virtual void URLStarredChanged(TabContents* source, bool starred) {} virtual void UpdateTargetURL(TabContents* source, const GURL& url) {} virtual void ToolbarSizeChanged(TabContents* source, bool is_animating) {} |