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

Side by Side Diff: chrome/browser/ui/webui/input_window_dialog_webui.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/ui/webui/input_window_dialog_webui.h" 5 #include "chrome/browser/ui/webui/input_window_dialog_webui.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/utf_string_conversions.h" 11 #include "base/utf_string_conversions.h"
12 #include "base/values.h" 12 #include "base/values.h"
13 #include "chrome/browser/ui/browser.h" 13 #include "chrome/browser/ui/browser.h"
14 #include "chrome/browser/ui/browser_list.h" 14 #include "chrome/browser/ui/browser_list.h"
15 #include "chrome/browser/ui/browser_dialogs.h" 15 #include "chrome/browser/ui/browser_dialogs.h"
16 #include "chrome/browser/ui/dialog_style.h" 16 #include "chrome/browser/ui/dialog_style.h"
17 #include "chrome/browser/ui/webui/html_dialog_ui.h" 17 #include "chrome/browser/ui/webui/html_dialog_ui.h"
18 #include "chrome/common/url_constants.h" 18 #include "chrome/common/url_constants.h"
19 #include "content/browser/tab_contents/tab_contents.h" 19 #include "content/browser/tab_contents/tab_contents.h"
20 #include "content/browser/webui/web_ui.h"
20 #include "grit/generated_resources.h" 21 #include "grit/generated_resources.h"
21 #include "ui/base/l10n/l10n_util.h" 22 #include "ui/base/l10n/l10n_util.h"
22 23
23 using content::WebContents; 24 using content::WebContents;
25 using content::WebUIMessageHandler;
24 26
25 namespace { 27 namespace {
26 28
27 const int kInputWindowDialogWidth = 300; 29 const int kInputWindowDialogWidth = 300;
28 const int kInputWindowDialogBaseHeight = 90; 30 const int kInputWindowDialogBaseHeight = 90;
29 const int kInputWindowDialogContentsHeight = 20; 31 const int kInputWindowDialogContentsHeight = 20;
30 32
31 } // namespace 33 } // namespace
32 34
33 //////////////////////////////////////////////////////////////////////////////// 35 ////////////////////////////////////////////////////////////////////////////////
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 } 170 }
169 string16 url; 171 string16 url;
170 if (args->GetSize() == 2 && args->GetString(0, &url)) { 172 if (args->GetSize() == 2 && args->GetString(0, &url)) {
171 texts.push_back(url); 173 texts.push_back(url);
172 } 174 }
173 const bool valid = delegate_->IsValid(texts); 175 const bool valid = delegate_->IsValid(texts);
174 scoped_ptr<Value> result(Value::CreateBooleanValue(valid)); 176 scoped_ptr<Value> result(Value::CreateBooleanValue(valid));
175 web_ui()->CallJavascriptFunction("inputWindowDialog.ackValidation", 177 web_ui()->CallJavascriptFunction("inputWindowDialog.ackValidation",
176 *result); 178 *result);
177 } 179 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/input_window_dialog_webui.h ('k') | chrome/browser/ui/webui/media/media_internals_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698