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

Side by Side Diff: chrome/browser/printing/cloud_print/cloud_print_setup_message_handler.cc

Issue 8986007: Move WebUIMessageHandler to its own file in the public directory and put it in the content namesp... (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/printing/cloud_print/cloud_print_setup_message_handler. h" 5 #include "chrome/browser/printing/cloud_print/cloud_print_setup_message_handler. h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/json/json_reader.h" 9 #include "base/json/json_reader.h"
10 #include "base/json/json_writer.h" 10 #include "base/json/json_writer.h"
11 #include "base/memory/scoped_ptr.h" 11 #include "base/memory/scoped_ptr.h"
12 #include "chrome/browser/printing/cloud_print/cloud_print_setup_flow.h" 12 #include "chrome/browser/printing/cloud_print/cloud_print_setup_flow.h"
13 #include "content/browser/webui/web_ui.h"
13 14
14 void CloudPrintSetupMessageHandler::RegisterMessages() { 15 void CloudPrintSetupMessageHandler::RegisterMessages() {
15 // Pass the WebUI object to the setup flow. 16 // Pass the WebUI object to the setup flow.
16 flow_->Attach(web_ui()); 17 flow_->Attach(web_ui());
17 18
18 web_ui()->RegisterMessageCallback("SubmitAuth", 19 web_ui()->RegisterMessageCallback("SubmitAuth",
19 base::Bind(&CloudPrintSetupMessageHandler::HandleSubmitAuth, 20 base::Bind(&CloudPrintSetupMessageHandler::HandleSubmitAuth,
20 base::Unretained(this))); 21 base::Unretained(this)));
21 web_ui()->RegisterMessageCallback("PrintTestPage", 22 web_ui()->RegisterMessageCallback("PrintTestPage",
22 base::Bind(&CloudPrintSetupMessageHandler::HandlePrintTestPage, 23 base::Bind(&CloudPrintSetupMessageHandler::HandlePrintTestPage,
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 58
58 void CloudPrintSetupMessageHandler::HandlePrintTestPage(const ListValue* args) { 59 void CloudPrintSetupMessageHandler::HandlePrintTestPage(const ListValue* args) {
59 if (flow_) 60 if (flow_)
60 flow_->OnUserClickedPrintTestPage(); 61 flow_->OnUserClickedPrintTestPage();
61 } 62 }
62 63
63 void CloudPrintSetupMessageHandler::HandleLearnMore(const ListValue* args) { 64 void CloudPrintSetupMessageHandler::HandleLearnMore(const ListValue* args) {
64 if (flow_) 65 if (flow_)
65 flow_->OnUserClickedLearnMore(); 66 flow_->OnUserClickedLearnMore();
66 } 67 }
OLDNEW
« no previous file with comments | « chrome/browser/printing/cloud_print/cloud_print_setup_message_handler.h ('k') | chrome/browser/printing/print_dialog_cloud.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698