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

Side by Side Diff: ios/public/provider/web/web_controller_provider.h

Issue 2527123003: [iOS] Upstream web_controller_provider_impl.{h,mm}. (Closed)
Patch Set: Fix downstream build. Created 4 years 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 IOS_PUBLIC_PROVIDER_WEB_WEB_CONTROLLER_PROVIDER_H_ 5 #ifndef IOS_PUBLIC_PROVIDER_WEB_WEB_CONTROLLER_PROVIDER_H_
6 #define IOS_PUBLIC_PROVIDER_WEB_WEB_CONTROLLER_PROVIDER_H_ 6 #define IOS_PUBLIC_PROVIDER_WEB_WEB_CONTROLLER_PROVIDER_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 // TODO(sdefresne): remove includes of web_controller_provider_factory.h and
11 // web_state_observer.h once downstream code has been fixed to use the correct
12 // includes.
13 #include "ios/public/provider/web/web_controller_provider_factory.h"
10 #include "ios/web/public/block_types.h" 14 #include "ios/web/public/block_types.h"
11 #include "ios/web/public/web_state/web_state_observer.h" 15 #include "ios/web/public/web_state/web_state_observer.h"
12 #include "url/gurl.h" 16 #include "url/gurl.h"
13 17
14 namespace web { 18 namespace web {
15 class BrowserState; 19 class BrowserState;
16 class WebState; 20 class WebState;
17 } 21 }
18 22
19 namespace ios { 23 namespace ios {
(...skipping 27 matching lines...) Expand all
47 // Returns the WebState associated with this web controller. 51 // Returns the WebState associated with this web controller.
48 virtual web::WebState* GetWebState() const; 52 virtual web::WebState* GetWebState() const;
49 53
50 // Injects |script| into the previously loaded page, if any, and calls 54 // Injects |script| into the previously loaded page, if any, and calls
51 // |completion| with the result. Calls |completion| with nil parameters 55 // |completion| with the result. Calls |completion| with nil parameters
52 // when there is no previously loaded page. 56 // when there is no previously loaded page.
53 virtual void InjectScript(const std::string& script, 57 virtual void InjectScript(const std::string& script,
54 web::JavaScriptResultBlock completion); 58 web::JavaScriptResultBlock completion);
55 }; 59 };
56 60
57 class WebControllerProviderFactory {
58 public:
59 WebControllerProviderFactory();
60 virtual ~WebControllerProviderFactory();
61
62 // Vends WebControllerProviders created using |browser_state|, passing
63 // ownership to callers.
64 virtual std::unique_ptr<WebControllerProvider> CreateWebControllerProvider(
65 web::BrowserState* browser_state);
66 };
67
68 } // namespace ios 61 } // namespace ios
69 62
70 #endif // IOS_PUBLIC_PROVIDER_WEB_WEB_CONTROLLER_PROVIDER_H_ 63 #endif // IOS_PUBLIC_PROVIDER_WEB_WEB_CONTROLLER_PROVIDER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698