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

Side by Side Diff: blimp/engine/browser/blimp_browser_main_parts.cc

Issue 1422363008: Add a basic UI to the Android Blimp client. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Made sure to clear old control data Created 5 years, 1 month 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
« no previous file with comments | « blimp/common/proto/navigation.proto ('k') | blimp/engine/browser/blimp_engine_session.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include "blimp/engine/browser/blimp_browser_main_parts.h" 5 #include "blimp/engine/browser/blimp_browser_main_parts.h"
6 6
7 #include "blimp/common/proto/blimp_message.pb.h" 7 #include "blimp/common/proto/blimp_message.pb.h"
8 #include "blimp/engine/browser/blimp_browser_context.h" 8 #include "blimp/engine/browser/blimp_browser_context.h"
9 #include "blimp/engine/browser/blimp_engine_session.h" 9 #include "blimp/engine/browser/blimp_engine_session.h"
10 #include "blimp/net/blimp_connection.h" 10 #include "blimp/net/blimp_connection.h"
(...skipping 28 matching lines...) Expand all
39 engine_session_.reset(new BlimpEngineSession(browser_context.Pass())); 39 engine_session_.reset(new BlimpEngineSession(browser_context.Pass()));
40 engine_session_->Initialize(); 40 engine_session_->Initialize();
41 41
42 // TODO(haibinlu): Create EngineConnectionManager to accept new connections. 42 // TODO(haibinlu): Create EngineConnectionManager to accept new connections.
43 // TODO(haibinlu): Remove these test messages and switch to using the 43 // TODO(haibinlu): Remove these test messages and switch to using the
44 // MessageDispatcher for incoming messages. 44 // MessageDispatcher for incoming messages.
45 BlimpMessage message; 45 BlimpMessage message;
46 message.set_type(BlimpMessage::CONTROL); 46 message.set_type(BlimpMessage::CONTROL);
47 message.mutable_control()->set_type(ControlMessage::CREATE_TAB); 47 message.mutable_control()->set_type(ControlMessage::CREATE_TAB);
48 engine_session_->OnBlimpMessage(message); 48 engine_session_->OnBlimpMessage(message);
49 message.mutable_control()->set_type(ControlMessage::LOAD_URL); 49 message.clear_control();
50 message.mutable_control()->mutable_load_url()->set_url( 50 message.set_type(BlimpMessage::NAVIGATION);
51 message.mutable_navigation()->set_type(NavigationMessage::LOAD_URL);
52 message.mutable_navigation()->mutable_load_url()->set_url(
51 "https://www.google.com/"); 53 "https://www.google.com/");
52 engine_session_->OnBlimpMessage(message); 54 engine_session_->OnBlimpMessage(message);
53 } 55 }
54 56
55 void BlimpBrowserMainParts::PostMainMessageLoopRun() { 57 void BlimpBrowserMainParts::PostMainMessageLoopRun() {
56 engine_session_.reset(); 58 engine_session_.reset();
57 } 59 }
58 60
59 BlimpBrowserContext* BlimpBrowserMainParts::GetBrowserContext() { 61 BlimpBrowserContext* BlimpBrowserMainParts::GetBrowserContext() {
60 return engine_session_->browser_context(); 62 return engine_session_->browser_context();
61 } 63 }
62 64
63 } // namespace engine 65 } // namespace engine
64 } // namespace blimp 66 } // namespace blimp
OLDNEW
« no previous file with comments | « blimp/common/proto/navigation.proto ('k') | blimp/engine/browser/blimp_engine_session.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698