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

Side by Side Diff: chrome/browser/infobars/infobar_extension_api.cc

Issue 12089062: Move API functions registrations out of ExtensionFunctionRegistry. (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: Created 7 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/infobars/infobar_extension_api.h" 5 #include "chrome/browser/infobars/infobar_extension_api.h"
6 6
7 #include "base/string_number_conversions.h" 7 #include "base/string_number_conversions.h"
8 #include "base/string_util.h" 8 #include "base/string_util.h"
9 #include "base/values.h" 9 #include "base/values.h"
10 #include "chrome/browser/api/infobars/confirm_infobar_delegate.h" 10 #include "chrome/browser/api/infobars/confirm_infobar_delegate.h"
(...skipping 13 matching lines...) Expand all
24 using extensions::Extension; 24 using extensions::Extension;
25 25
26 namespace { 26 namespace {
27 27
28 const char kHtmlPath[] = "path"; 28 const char kHtmlPath[] = "path";
29 const char kTabId[] = "tabId"; 29 const char kTabId[] = "tabId";
30 const char kHeight[] = "height"; 30 const char kHeight[] = "height";
31 31
32 } // namespace 32 } // namespace
33 33
34 bool ShowInfoBarFunction::RunImpl() { 34 bool InfobarsShowFunction::RunImpl() {
35 DictionaryValue* args; 35 DictionaryValue* args;
36 EXTENSION_FUNCTION_VALIDATE(args_->GetDictionary(0, &args)); 36 EXTENSION_FUNCTION_VALIDATE(args_->GetDictionary(0, &args));
37 37
38 int tab_id; 38 int tab_id;
39 EXTENSION_FUNCTION_VALIDATE(args->GetInteger(kTabId, &tab_id)); 39 EXTENSION_FUNCTION_VALIDATE(args->GetInteger(kTabId, &tab_id));
40 40
41 std::string html_path; 41 std::string html_path;
42 EXTENSION_FUNCTION_VALIDATE(args->GetString(kHtmlPath, &html_path)); 42 EXTENSION_FUNCTION_VALIDATE(args->GetString(kHtmlPath, &html_path));
43 43
44 int height = 0; 44 int height = 0;
(...skipping 22 matching lines...) Expand all
67 ExtensionInfoBarDelegate::Create( 67 ExtensionInfoBarDelegate::Create(
68 InfoBarService::FromWebContents(web_contents), browser, GetExtension(), 68 InfoBarService::FromWebContents(web_contents), browser, GetExtension(),
69 url, height); 69 url, height);
70 70
71 // TODO(finnur): Return the actual DOMWindow object. Bug 26463. 71 // TODO(finnur): Return the actual DOMWindow object. Bug 26463.
72 DCHECK(browser->extension_window_controller()); 72 DCHECK(browser->extension_window_controller());
73 SetResult(browser->extension_window_controller()->CreateWindowValue()); 73 SetResult(browser->extension_window_controller()->CreateWindowValue());
74 74
75 return true; 75 return true;
76 } 76 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698