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

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

Issue 252653002: Rename (Chrome)SyncExtensionFunction::RunImpl to RunSync so that the RunImpl (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix bookmarks Created 6 years, 7 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/strings/string_number_conversions.h" 7 #include "base/strings/string_number_conversions.h"
8 #include "base/strings/string_util.h" 8 #include "base/strings/string_util.h"
9 #include "base/values.h" 9 #include "base/values.h"
10 #include "chrome/browser/extensions/api/tabs/tabs_constants.h" 10 #include "chrome/browser/extensions/api/tabs/tabs_constants.h"
11 #include "chrome/browser/extensions/extension_infobar_delegate.h" 11 #include "chrome/browser/extensions/extension_infobar_delegate.h"
12 #include "chrome/browser/extensions/extension_tab_util.h" 12 #include "chrome/browser/extensions/extension_tab_util.h"
13 #include "chrome/browser/extensions/window_controller.h" 13 #include "chrome/browser/extensions/window_controller.h"
14 #include "chrome/browser/ui/browser.h" 14 #include "chrome/browser/ui/browser.h"
15 #include "chrome/common/url_constants.h" 15 #include "chrome/common/url_constants.h"
16 #include "content/public/browser/web_contents.h" 16 #include "content/public/browser/web_contents.h"
17 #include "extensions/browser/extension_host.h" 17 #include "extensions/browser/extension_host.h"
18 #include "extensions/common/error_utils.h" 18 #include "extensions/common/error_utils.h"
19 #include "extensions/common/extension.h" 19 #include "extensions/common/extension.h"
20 #include "grit/generated_resources.h" 20 #include "grit/generated_resources.h"
21 21
22 22 bool InfobarsShowFunction::RunSync() {
23 bool InfobarsShowFunction::RunImpl() {
24 base::DictionaryValue* args; 23 base::DictionaryValue* args;
25 EXTENSION_FUNCTION_VALIDATE(args_->GetDictionary(0, &args)); 24 EXTENSION_FUNCTION_VALIDATE(args_->GetDictionary(0, &args));
26 25
27 const char kTabId[] = "tabId"; 26 const char kTabId[] = "tabId";
28 int tab_id; 27 int tab_id;
29 EXTENSION_FUNCTION_VALIDATE(args->GetInteger(kTabId, &tab_id)); 28 EXTENSION_FUNCTION_VALIDATE(args->GetInteger(kTabId, &tab_id));
30 29
31 const char kHtmlPath[] = "path"; 30 const char kHtmlPath[] = "path";
32 std::string html_path; 31 std::string html_path;
33 EXTENSION_FUNCTION_VALIDATE(args->GetString(kHtmlPath, &html_path)); 32 EXTENSION_FUNCTION_VALIDATE(args->GetString(kHtmlPath, &html_path));
(...skipping 17 matching lines...) Expand all
51 GURL url(extension->GetResourceURL(extension->url(), html_path)); 50 GURL url(extension->GetResourceURL(extension->url(), html_path));
52 ExtensionInfoBarDelegate::Create(web_contents, browser, GetExtension(), url, 51 ExtensionInfoBarDelegate::Create(web_contents, browser, GetExtension(), url,
53 height); 52 height);
54 53
55 // TODO(finnur): Return the actual DOMWindow object. Bug 26463. 54 // TODO(finnur): Return the actual DOMWindow object. Bug 26463.
56 DCHECK(browser->extension_window_controller()); 55 DCHECK(browser->extension_window_controller());
57 SetResult(browser->extension_window_controller()->CreateWindowValue()); 56 SetResult(browser->extension_window_controller()->CreateWindowValue());
58 57
59 return true; 58 return true;
60 } 59 }
OLDNEW
« no previous file with comments | « chrome/browser/infobars/infobar_extension_api.h ('k') | chrome/browser/speech/extension_api/tts_engine_extension_api.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698