forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[invalidations] Created a stub about:invalidations
Added the minimum changes necessary to get the about:invalidations page to display a "Works" text in HTML. In following patches, functionality will be added to display the connection status, the invalidations count for each datatype and other debugging information. Work was based on signin work carried out in issue=11377015 and following patches. BUG=263863 Review URL: https://codereview.chromium.org/144093005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@248029 0039d316-1c4b-4281-b951-d872f2087c98
- Loading branch information
mferreria@google.com
committed
Jan 30, 2014
1 parent
9043979
commit f17be76
Showing
15 changed files
with
128 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
/* Copyright 2014 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. | ||
*/ | ||
|
||
/* | ||
* TODO(mferreria): Implement this CSS. See http://crbug.com/263863 | ||
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<html> | ||
<head> | ||
<title>Invalidations</title> | ||
<script src="chrome://resources/js/cr.js"></script> | ||
<script src="chrome://resources/js/parse_html_subset.js"></script> | ||
<script src="chrome://resources/js/util.js"></script> | ||
<script src="chrome://invalidations/about_invalidations.js"></script> | ||
<link rel="stylesheet" type="text/css" href="about_invalidations.css"> | ||
</head> | ||
|
||
<body> | ||
<h1>Invalidations Debug Information | ||
<button id='refresh-invalidation-data'>Refresh</button></h1> | ||
</body> | ||
|
||
|
||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
// Copyright 2014 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. | ||
|
||
|
||
// TODO(mferreria): Implement in this JS the ability to get from the C++ Layer | ||
// the invalidations history and display them as they come. | ||
// See http://crbug.com/263863 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<grit latest_public_release="0" current_release="1"> | ||
<outputs> | ||
<output filename="grit/invalidations_resources.h" type="rc_header"> | ||
<emit emit_type='prepend'></emit> | ||
</output> | ||
<output filename="invalidations_resources.pak" type="data_package" /> | ||
</outputs> | ||
<release seq="1"> | ||
<includes> | ||
<include name="IDR_ABOUT_INVALIDATIONS_HTML" file="about_invalidations.html" flattenhtml="true" allowexternalscript="true" type="BINDATA" /> | ||
<include name="IDR_ABOUT_INVALIDATIONS_JS" file="about_invalidations.js" type="BINDATA" /> | ||
<include name="IDR_ABOUT_INVALIDATIONS_CSS" file="about_invalidations.css" type="BINDATA" /> | ||
</includes> | ||
</release> | ||
</grit> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
// Copyright 2014 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/ui/webui/invalidations_ui.h" | ||
|
||
#include "chrome/browser/profiles/profile.h" | ||
#include "chrome/common/url_constants.h" | ||
#include "content/public/browser/web_ui.h" | ||
#include "content/public/browser/web_ui_data_source.h" | ||
#include "grit/invalidations_resources.h" | ||
|
||
content::WebUIDataSource* CreateInvalidationsHTMLSource() { | ||
// This is done once per opening of the page | ||
// This method does not fire when refreshing the page | ||
content::WebUIDataSource* source = | ||
content::WebUIDataSource::Create(chrome::kChromeUIInvalidationsHost); | ||
source->AddResourcePath("about_invalidations.js", IDR_ABOUT_INVALIDATIONS_JS); | ||
source->SetDefaultResource(IDR_ABOUT_INVALIDATIONS_HTML); | ||
return source; | ||
} | ||
|
||
InvalidationsUI::InvalidationsUI(content::WebUI* web_ui) | ||
: WebUIController(web_ui) { | ||
Profile* profile = Profile::FromWebUI(web_ui); | ||
if (profile) { | ||
content::WebUIDataSource::Add(profile, CreateInvalidationsHTMLSource()); | ||
} | ||
} | ||
|
||
InvalidationsUI::~InvalidationsUI() { } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
// Copyright 2014 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. | ||
|
||
#ifndef CHROME_BROWSER_UI_WEBUI_INVALIDATIONS_UI_H_ | ||
#define CHROME_BROWSER_UI_WEBUI_INVALIDATIONS_UI_H_ | ||
|
||
#include "base/basictypes.h" | ||
#include "base/compiler_specific.h" | ||
#include "content/public/browser/web_ui_controller.h" | ||
|
||
// The implementation for the chrome://invalidations page. | ||
class InvalidationsUI : public content::WebUIController { | ||
public: | ||
explicit InvalidationsUI(content::WebUI* web_ui); | ||
virtual ~InvalidationsUI(); | ||
|
||
private: | ||
DISALLOW_COPY_AND_ASSIGN(InvalidationsUI); | ||
}; | ||
|
||
#endif // CHROME_BROWSER_UI_WEBUI_INVALIDATIONS_UI_H_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters