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

Side by Side Diff: blimp/client/session/blimp_client_session_linux.cc

Issue 1636163002: Restructure contents of blimp/client. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "blimp/client/session/blimp_client_session_linux.h"
6
7 #include "base/logging.h"
8 #include "base/message_loop/message_loop.h"
9 #include "blimp/client/linux/blimp_display_manager.h"
10 #include "ui/events/platform/platform_event_source.h"
11 #include "ui/gfx/geometry/size.h"
12 #include "url/gurl.h"
13
14 namespace blimp {
15 namespace client {
16 namespace {
17
18 const int kDummyTabId = 0;
19
20 class FakeNavigationFeatureDelegate
21 : public NavigationFeature::NavigationFeatureDelegate {
22 public:
23 FakeNavigationFeatureDelegate();
24 ~FakeNavigationFeatureDelegate();
25
26 // NavigationFeatureDelegate implementation.
27 void OnUrlChanged(int tab_id, const GURL& url) override;
28 void OnFaviconChanged(int tab_id, const SkBitmap& favicon) override;
29 void OnTitleChanged(int tab_id, const std::string& title) override;
30 void OnLoadingChanged(int tab_id, bool loading) override;
31
32 private:
33 DISALLOW_COPY_AND_ASSIGN(FakeNavigationFeatureDelegate);
34 };
35
36 FakeNavigationFeatureDelegate::FakeNavigationFeatureDelegate() {}
37
38 FakeNavigationFeatureDelegate::~FakeNavigationFeatureDelegate() {}
39
40 void FakeNavigationFeatureDelegate::OnUrlChanged(int tab_id, const GURL& url) {
41 DVLOG(1) << "URL changed to " << url << " in tab " << tab_id;
42 }
43
44 void FakeNavigationFeatureDelegate::OnFaviconChanged(int tab_id,
45 const SkBitmap& favicon) {
46 DVLOG(1) << "Favicon changed in tab " << tab_id;
47 }
48
49 void FakeNavigationFeatureDelegate::OnTitleChanged(int tab_id,
50 const std::string& title) {
51 DVLOG(1) << "Title changed to " << title << " in tab " << tab_id;
52 }
53
54 void FakeNavigationFeatureDelegate::OnLoadingChanged(int tab_id, bool loading) {
55 DVLOG(1) << "Loading status changed to " << loading << " in tab " << tab_id;
56 }
57
58 } // namespace
59
60 BlimpClientSessionLinux::BlimpClientSessionLinux()
61 : event_source_(ui::PlatformEventSource::CreateDefault()),
62 navigation_feature_delegate_(new FakeNavigationFeatureDelegate) {
63 blimp_display_manager_.reset(new BlimpDisplayManager(gfx::Size(800, 600),
64 this,
65 GetRenderWidgetFeature(),
66 GetTabControlFeature()));
67 GetNavigationFeature()->SetDelegate(kDummyTabId,
68 navigation_feature_delegate_.get());
69 }
70
71 BlimpClientSessionLinux::~BlimpClientSessionLinux() {}
72
73 void BlimpClientSessionLinux::OnClosed() {
74 base::MessageLoop::current()->QuitNow();
75 }
76
77 } // namespace client
78 } // namespace blimp
OLDNEW
« no previous file with comments | « blimp/client/session/blimp_client_session_linux.h ('k') | blimp/client/session/navigation_feature.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698