Cleanup unused headers, data members and functions.

This commit is contained in:
Cheng Zhao 2013-05-14 15:36:40 +08:00 committed by Adam Roben
parent 2cd6dd791e
commit f623ddf7fc
5 changed files with 4 additions and 17 deletions

View file

@ -7,8 +7,6 @@
#include "browser/browser_context.h"
#include "browser/web_ui_controller_factory.h"
#include "net/socket/tcp_listen_socket.h"
namespace brightray {
BrowserMainParts::BrowserMainParts() {

View file

@ -93,10 +93,9 @@ class BundledDataSource : public content::URLDataSource {
}
DevToolsUI::DevToolsUI(BrowserContext* browser_context, content::WebUI* web_ui)
: WebUIController(web_ui),
browser_context_(browser_context) {
: WebUIController(web_ui) {
web_ui->SetBindings(0);
content::URLDataSource::Add(browser_context_, new BundledDataSource());
content::URLDataSource::Add(browser_context, new BundledDataSource());
}
}

View file

@ -17,9 +17,6 @@ class DevToolsUI : public content::WebUIController {
explicit DevToolsUI(BrowserContext* browser_context, content::WebUI* web_ui);
private:
// Weak reference to the browser context.
BrowserContext* browser_context_;
DISALLOW_COPY_AND_ASSIGN(DevToolsUI);
};

View file

@ -28,10 +28,6 @@ namespace {
const char kChromeUIDevToolsURL[] = "chrome-devtools://devtools/devtools.html";
const char kDockSidePref[] = "brightray.devtools.dockside";
GURL GetDevToolsURL() {
return GURL(kChromeUIDevToolsURL);
}
}
// Implemented separately on each platform.
@ -76,7 +72,8 @@ void InspectableWebContentsImpl::ShowDevTools() {
frontend_host_.reset(content::DevToolsClientHost::CreateDevToolsFrontendHost(devtools_web_contents_.get(), this));
content::DevToolsManager::GetInstance()->RegisterDevToolsClientHostFor(agent_host_, frontend_host_.get());
devtools_web_contents_->GetController().LoadURL(GetDevToolsURL(), content::Referrer(), content::PAGE_TRANSITION_AUTO_TOPLEVEL, std::string());
GURL devtools_url(kChromeUIDevToolsURL);
devtools_web_contents_->GetController().LoadURL(devtools_url, content::Referrer(), content::PAGE_TRANSITION_AUTO_TOPLEVEL, std::string());
}
view_->SetDockSide(dock_side_);
@ -145,9 +142,6 @@ void InspectableWebContentsImpl::SearchInPath(int request_id, const std::string&
void InspectableWebContentsImpl::InspectedContentsClosing() {
}
void InspectableWebContentsImpl::RenderViewCreated(content::RenderViewHost* render_view_host) {
}
void InspectableWebContentsImpl::AboutToNavigateRenderView(content::RenderViewHost* render_view_host) {
content::DevToolsClientHost::SetupDevToolsFrontendClient(web_contents()->GetRenderViewHost());
}

View file

@ -69,7 +69,6 @@ private:
// content::WebContentsObserver
virtual void RenderViewCreated(content::RenderViewHost*) OVERRIDE;
virtual void AboutToNavigateRenderView(content::RenderViewHost* render_view_host) OVERRIDE;
virtual void DidFinishLoad(int64 frame_id,
const GURL& validated_url,