Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(280)

Side by Side Diff: chrome/browser/ui/webui/keyboard_ui.cc

Issue 9003014: Replace WebUI::tab_contents() with web_contents() and switch all users to use web_contents.h inst... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 8 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/webui/keyboard_ui.h" 5 #include "chrome/browser/ui/webui/keyboard_ui.h"
6 6
7 #include "base/memory/ref_counted_memory.h" 7 #include "base/memory/ref_counted_memory.h"
8 #include "base/memory/singleton.h" 8 #include "base/memory/singleton.h"
9 #include "base/string_piece.h" 9 #include "base/string_piece.h"
10 #include "chrome/browser/profiles/profile.h" 10 #include "chrome/browser/profiles/profile.h"
11 #include "chrome/browser/ui/webui/chrome_url_data_manager.h" 11 #include "chrome/browser/ui/webui/chrome_url_data_manager.h"
12 #include "chrome/common/url_constants.h" 12 #include "chrome/common/url_constants.h"
13 #include "content/browser/tab_contents/tab_contents.h" 13 #include "content/public/browser/web_contents.h"
14 #include "ui/base/resource/resource_bundle.h" 14 #include "ui/base/resource/resource_bundle.h"
15 15
16 using content::WebContents;
17
16 /////////////////////////////////////////////////////////////////////////////// 18 ///////////////////////////////////////////////////////////////////////////////
17 // KeyboardUI 19 // KeyboardUI
18 20
19 KeyboardUI::KeyboardUI(TabContents* contents) 21 KeyboardUI::KeyboardUI(WebContents* contents)
20 : ChromeWebUI(contents) { 22 : ChromeWebUI(contents) {
21 KeyboardHTMLSource* html_source = new KeyboardHTMLSource(); 23 KeyboardHTMLSource* html_source = new KeyboardHTMLSource();
22 Profile* profile = Profile::FromBrowserContext(contents->GetBrowserContext()); 24 Profile* profile = Profile::FromBrowserContext(contents->GetBrowserContext());
23 profile->GetChromeURLDataManager()->AddDataSource(html_source); 25 profile->GetChromeURLDataManager()->AddDataSource(html_source);
24 } 26 }
25 27
26 KeyboardUI::~KeyboardUI() { 28 KeyboardUI::~KeyboardUI() {
27 } 29 }
28 30
29 /////////////////////////////////////////////////////////////////////////////// 31 ///////////////////////////////////////////////////////////////////////////////
(...skipping 10 matching lines...) Expand all
40 << "been triggered"; 42 << "been triggered";
41 SendResponse(request_id, NULL); 43 SendResponse(request_id, NULL);
42 } 44 }
43 45
44 std::string KeyboardUI::KeyboardHTMLSource::GetMimeType( 46 std::string KeyboardUI::KeyboardHTMLSource::GetMimeType(
45 const std::string&) const { 47 const std::string&) const {
46 NOTREACHED() << "We should never get here since the extension should have" 48 NOTREACHED() << "We should never get here since the extension should have"
47 << "been triggered"; 49 << "been triggered";
48 return "text/html"; 50 return "text/html";
49 } 51 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/keyboard_ui.h ('k') | chrome/browser/ui/webui/media/media_internals_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698