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

Side by Side Diff: chrome/browser/extensions/extension_tabs_module.h

Issue 9225010: Fix callback for chrome.tabs.update with javascript URLs. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
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
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 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_TABS_MODULE_H__ 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_TABS_MODULE_H__
6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_TABS_MODULE_H__ 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_TABS_MODULE_H__
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
11 11
12 #include "base/compiler_specific.h" 12 #include "base/compiler_specific.h"
13 #include "chrome/browser/extensions/extension_function.h" 13 #include "chrome/browser/extensions/extension_function.h"
14 #include "content/public/browser/notification_observer.h" 14 #include "content/public/browser/notification_observer.h"
15 #include "content/public/browser/notification_registrar.h" 15 #include "content/public/browser/notification_registrar.h"
16 #include "content/public/browser/web_contents_observer.h" 16 #include "content/public/browser/web_contents_observer.h"
17 #include "googleurl/src/gurl.h" 17 #include "googleurl/src/gurl.h"
18 18
19 class BackingStore; 19 class BackingStore;
20 class SkBitmap; 20 class SkBitmap;
21 21 class TabStripModel;
22 namespace base { 22 namespace base {
23 class DictionaryValue; 23 class DictionaryValue;
24 } // namespace base 24 } // namespace base
25 25 namespace content {
26 class WebContents;
27 } // namespace content
26 // Windows 28 // Windows
27 class GetWindowFunction : public SyncExtensionFunction { 29 class GetWindowFunction : public SyncExtensionFunction {
28 virtual ~GetWindowFunction() {} 30 virtual ~GetWindowFunction() {}
29 virtual bool RunImpl() OVERRIDE; 31 virtual bool RunImpl() OVERRIDE;
30 DECLARE_EXTENSION_FUNCTION_NAME("windows.get") 32 DECLARE_EXTENSION_FUNCTION_NAME("windows.get")
31 }; 33 };
32 class GetCurrentWindowFunction : public SyncExtensionFunction { 34 class GetCurrentWindowFunction : public SyncExtensionFunction {
33 virtual ~GetCurrentWindowFunction() {} 35 virtual ~GetCurrentWindowFunction() {}
34 virtual bool RunImpl() OVERRIDE; 36 virtual bool RunImpl() OVERRIDE;
35 DECLARE_EXTENSION_FUNCTION_NAME("windows.getCurrent") 37 DECLARE_EXTENSION_FUNCTION_NAME("windows.getCurrent")
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 public content::WebContentsObserver { 111 public content::WebContentsObserver {
110 public: 112 public:
111 UpdateTabFunction(); 113 UpdateTabFunction();
112 private: 114 private:
113 virtual ~UpdateTabFunction() {} 115 virtual ~UpdateTabFunction() {}
114 virtual bool RunImpl() OVERRIDE; 116 virtual bool RunImpl() OVERRIDE;
115 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; 117 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
116 void OnExecuteCodeFinished(int request_id, 118 void OnExecuteCodeFinished(int request_id,
117 bool success, 119 bool success,
118 const std::string& error); 120 const std::string& error);
121 void PopulateResult();
122 content::WebContents* web_contents_;
123 TabStripModel* tab_strip_;
124 int tab_index_;
119 DECLARE_EXTENSION_FUNCTION_NAME("tabs.update") 125 DECLARE_EXTENSION_FUNCTION_NAME("tabs.update")
120 }; 126 };
121 class MoveTabsFunction : public SyncExtensionFunction { 127 class MoveTabsFunction : public SyncExtensionFunction {
122 virtual ~MoveTabsFunction() {} 128 virtual ~MoveTabsFunction() {}
123 virtual bool RunImpl() OVERRIDE; 129 virtual bool RunImpl() OVERRIDE;
124 DECLARE_EXTENSION_FUNCTION_NAME("tabs.move") 130 DECLARE_EXTENSION_FUNCTION_NAME("tabs.move")
125 }; 131 };
126 class ReloadTabFunction : public SyncExtensionFunction { 132 class ReloadTabFunction : public SyncExtensionFunction {
127 virtual ~ReloadTabFunction() {} 133 virtual ~ReloadTabFunction() {}
128 virtual bool RunImpl() OVERRIDE; 134 virtual bool RunImpl() OVERRIDE;
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 // The format (JPEG vs PNG) of the resulting image. Set in RunImpl(). 176 // The format (JPEG vs PNG) of the resulting image. Set in RunImpl().
171 ImageFormat image_format_; 177 ImageFormat image_format_;
172 178
173 // Quality setting to use when encoding jpegs. Set in RunImpl(). 179 // Quality setting to use when encoding jpegs. Set in RunImpl().
174 int image_quality_; 180 int image_quality_;
175 181
176 DECLARE_EXTENSION_FUNCTION_NAME("tabs.captureVisibleTab") 182 DECLARE_EXTENSION_FUNCTION_NAME("tabs.captureVisibleTab")
177 }; 183 };
178 184
179 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_TABS_MODULE_H__ 185 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_TABS_MODULE_H__
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698