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

Side by Side Diff: blimp/engine/session/blimp_engine_session.h

Issue 2026813003: Enable external popup menu in Blimp, part 2/2. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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 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 BLIMP_ENGINE_SESSION_BLIMP_ENGINE_SESSION_H_ 5 #ifndef BLIMP_ENGINE_SESSION_BLIMP_ENGINE_SESSION_H_
6 #define BLIMP_ENGINE_SESSION_BLIMP_ENGINE_SESSION_H_ 6 #define BLIMP_ENGINE_SESSION_BLIMP_ENGINE_SESSION_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
11 #include <vector> 11 #include <vector>
12 12
13 #include "base/macros.h" 13 #include "base/macros.h"
14 #include "blimp/common/proto/blimp_message.pb.h" 14 #include "blimp/common/proto/blimp_message.pb.h"
15 #include "blimp/engine/feature/engine_render_widget_feature.h" 15 #include "blimp/engine/feature/engine_render_widget_feature.h"
16 #include "blimp/engine/feature/engine_settings_feature.h" 16 #include "blimp/engine/feature/engine_settings_feature.h"
17 #include "blimp/engine/session/page_load_tracker.h" 17 #include "blimp/engine/session/page_load_tracker.h"
18 #include "blimp/net/blimp_message_processor.h" 18 #include "blimp/net/blimp_message_processor.h"
19 #include "blimp/net/connection_error_observer.h" 19 #include "blimp/net/connection_error_observer.h"
20 #include "content/public/browser/invalidate_type.h" 20 #include "content/public/browser/invalidate_type.h"
21 #include "content/public/browser/web_contents_delegate.h" 21 #include "content/public/browser/web_contents_delegate.h"
22 #include "content/public/browser/web_contents_observer.h" 22 #include "content/public/browser/web_contents_observer.h"
23 #include "content/public/browser/web_contents_view_delegate.h"
23 #include "net/base/completion_callback.h" 24 #include "net/base/completion_callback.h"
24 #include "ui/base/ime/input_method_observer.h" 25 #include "ui/base/ime/input_method_observer.h"
25 #include "ui/gfx/geometry/size.h" 26 #include "ui/gfx/geometry/size.h"
26 27
27 namespace aura { 28 namespace aura {
28 class WindowTreeHost; 29 class WindowTreeHost;
29 30
30 namespace client { 31 namespace client {
31 class DefaultCaptureClient; 32 class DefaultCaptureClient;
32 class WindowTreeClient; 33 class WindowTreeClient;
33 } // namespace client 34 } // namespace client
34 } // namespace aura 35 } // namespace aura
35 36
36 namespace content { 37 namespace content {
37 class BrowserContext; 38 class BrowserContext;
39 class RenderFrameHost;
38 class RenderViewHost; 40 class RenderViewHost;
39 class WebContents; 41 class WebContents;
42 struct MenuItem;
40 } 43 }
41 44
42 namespace gfx { 45 namespace gfx {
43 class Size; 46 class Size;
44 } 47 }
45 48
46 namespace net { 49 namespace net {
47 class NetLog; 50 class NetLog;
48 } 51 }
49 52
(...skipping 15 matching lines...) Expand all
65 class BlimpEngineConfig; 68 class BlimpEngineConfig;
66 class BlimpFocusClient; 69 class BlimpFocusClient;
67 class BlimpScreen; 70 class BlimpScreen;
68 class BlimpWindowTreeHost; 71 class BlimpWindowTreeHost;
69 class EngineNetworkComponents; 72 class EngineNetworkComponents;
70 73
71 class BlimpEngineSession 74 class BlimpEngineSession
72 : public BlimpMessageProcessor, 75 : public BlimpMessageProcessor,
73 public content::WebContentsDelegate, 76 public content::WebContentsDelegate,
74 public content::WebContentsObserver, 77 public content::WebContentsObserver,
78 public content::WebContentsViewDelegate,
75 public ui::InputMethodObserver, 79 public ui::InputMethodObserver,
76 public EngineRenderWidgetFeature::RenderWidgetMessageDelegate, 80 public EngineRenderWidgetFeature::RenderWidgetMessageDelegate,
77 public PageLoadTrackerClient { 81 public PageLoadTrackerClient {
78 public: 82 public:
79 using GetPortCallback = base::Callback<void(uint16_t)>; 83 using GetPortCallback = base::Callback<void(uint16_t)>;
80 84
81 BlimpEngineSession(std::unique_ptr<BlimpBrowserContext> browser_context, 85 BlimpEngineSession(std::unique_ptr<BlimpBrowserContext> browser_context,
82 net::NetLog* net_log, 86 net::NetLog* net_log,
83 BlimpEngineConfig* config, 87 BlimpEngineConfig* config,
84 SettingsManager* settings_manager); 88 SettingsManager* settings_manager);
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 void OnTextInputStateChanged(const ui::TextInputClient* client) override; 161 void OnTextInputStateChanged(const ui::TextInputClient* client) override;
158 void OnInputMethodDestroyed(const ui::InputMethod* input_method) override; 162 void OnInputMethodDestroyed(const ui::InputMethod* input_method) override;
159 void OnShowImeIfNeeded() override; 163 void OnShowImeIfNeeded() override;
160 164
161 // content::WebContentsObserver implementation. 165 // content::WebContentsObserver implementation.
162 void RenderViewCreated(content::RenderViewHost* render_view_host) override; 166 void RenderViewCreated(content::RenderViewHost* render_view_host) override;
163 void RenderViewHostChanged(content::RenderViewHost* old_host, 167 void RenderViewHostChanged(content::RenderViewHost* old_host,
164 content::RenderViewHost* new_host) override; 168 content::RenderViewHost* new_host) override;
165 void RenderViewDeleted(content::RenderViewHost* render_view_host) override; 169 void RenderViewDeleted(content::RenderViewHost* render_view_host) override;
166 170
171 // content::WebContentsViewDelegate
172 void ShowPopupMenu(content::RenderFrameHost* render_frame_host,
173 const gfx::Rect& bounds,
174 int item_height,
175 double item_font_size,
176 int selected_item,
177 const std::vector<content::MenuItem>& items,
178 bool right_aligned,
179 bool allow_multiple_selection) override;
180 void HidePopupMenu() override;
181
167 // PageLoadTrackerClient implementation. 182 // PageLoadTrackerClient implementation.
168 void SendPageLoadStatusUpdate(PageLoadStatus load_status) override; 183 void SendPageLoadStatusUpdate(PageLoadStatus load_status) override;
169 184
170 // Sets up and owns |new_contents|. 185 // Sets up and owns |new_contents|.
171 void PlatformSetContents(std::unique_ptr<content::WebContents> new_contents); 186 void PlatformSetContents(std::unique_ptr<content::WebContents> new_contents);
172 187
173 // Presents the client's single screen. 188 // Presents the client's single screen.
174 // Screen should be deleted after browser context (crbug.com/613372). 189 // Screen should be deleted after browser context (crbug.com/613372).
175 std::unique_ptr<BlimpScreen> screen_; 190 std::unique_ptr<BlimpScreen> screen_;
176 191
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 std::unique_ptr<BlimpMessageProcessor> tab_control_message_sender_; 237 std::unique_ptr<BlimpMessageProcessor> tab_control_message_sender_;
223 std::unique_ptr<BlimpMessageProcessor> navigation_message_sender_; 238 std::unique_ptr<BlimpMessageProcessor> navigation_message_sender_;
224 239
225 DISALLOW_COPY_AND_ASSIGN(BlimpEngineSession); 240 DISALLOW_COPY_AND_ASSIGN(BlimpEngineSession);
226 }; 241 };
227 242
228 } // namespace engine 243 } // namespace engine
229 } // namespace blimp 244 } // namespace blimp
230 245
231 #endif // BLIMP_ENGINE_SESSION_BLIMP_ENGINE_SESSION_H_ 246 #endif // BLIMP_ENGINE_SESSION_BLIMP_ENGINE_SESSION_H_
OLDNEW
« no previous file with comments | « blimp/engine/app/blimp_content_browser_client.cc ('k') | blimp/engine/session/blimp_engine_session.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698