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

Side by Side Diff: chrome/browser/remoting/setup_flow.cc

Issue 6479007: Attempt 3 at: Splits ChromeURLDataManager into 2 chunks:... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 10 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/remoting/setup_flow.h" 5 #include "chrome/browser/remoting/setup_flow.h"
6 6
7 #include "base/json/json_reader.h" 7 #include "base/json/json_reader.h"
8 #include "base/json/json_writer.h" 8 #include "base/json/json_writer.h"
9 #include "base/utf_string_conversions.h" 9 #include "base/utf_string_conversions.h"
10 #include "base/values.h" 10 #include "base/values.h"
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 ExecuteJavascriptInIFrame(kDoneIframeXPath, javascript); 109 ExecuteJavascriptInIFrame(kDoneIframeXPath, javascript);
110 110
111 flow()->web_ui()->CallJavascriptFunction(L"showSetupDone"); 111 flow()->web_ui()->CallJavascriptFunction(L"showSetupDone");
112 112
113 ExecuteJavascriptInIFrame(kDoneIframeXPath, L"onPageShown();"); 113 ExecuteJavascriptInIFrame(kDoneIframeXPath, L"onPageShown();");
114 } 114 }
115 115
116 SetupFlowContext::SetupFlowContext() { } 116 SetupFlowContext::SetupFlowContext() { }
117 SetupFlowContext::~SetupFlowContext() { } 117 SetupFlowContext::~SetupFlowContext() { }
118 118
119 SetupFlow::SetupFlow(const std::string& args, Profile* profile, 119 SetupFlow::SetupFlow(const std::string& args,
120 Profile* profile,
120 SetupFlowStep* first_step) 121 SetupFlowStep* first_step)
121 : web_ui_(NULL), 122 : web_ui_(NULL),
122 dialog_start_args_(args), 123 dialog_start_args_(args),
123 profile_(profile), 124 profile_(profile),
124 current_step_(first_step) { 125 current_step_(first_step) {
125 // TODO(hclam): The data source should be added once. 126 // TODO(hclam): The data source should be added once.
126 BrowserThread::PostTask( 127 profile->GetChromeURLDataManager()->AddDataSource(
127 BrowserThread::IO, FROM_HERE, 128 new RemotingResourcesSource());
128 NewRunnableMethod(ChromeURLDataManager::GetInstance(),
129 &ChromeURLDataManager::AddDataSource,
130 make_scoped_refptr(new RemotingResourcesSource())));
131 } 129 }
132 130
133 SetupFlow::~SetupFlow() { } 131 SetupFlow::~SetupFlow() { }
134 132
135 // static 133 // static
136 SetupFlow* SetupFlow::OpenSetupDialog(Profile* profile) { 134 SetupFlow* SetupFlow::OpenSetupDialog(Profile* profile) {
137 // Set the arguments for showing the gaia login page. 135 // Set the arguments for showing the gaia login page.
138 DictionaryValue args; 136 DictionaryValue args;
139 args.SetString("iframeToShow", "login"); 137 args.SetString("iframeToShow", "login");
140 args.SetString("user", ""); 138 args.SetString("user", "");
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
260 BrowserThread::PostTask( 258 BrowserThread::PostTask(
261 BrowserThread::UI, FROM_HERE, 259 BrowserThread::UI, FROM_HERE,
262 new DeleteTask<SetupFlowStep>(current_step_.release())); 260 new DeleteTask<SetupFlowStep>(current_step_.release()));
263 } 261 }
264 262
265 current_step_.reset(next_step); 263 current_step_.reset(next_step);
266 StartCurrentStep(); 264 StartCurrentStep();
267 } 265 }
268 266
269 } // namespace remoting 267 } // namespace remoting
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698