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

Unified Diff: blimp/client/session/tab_control_feature.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « blimp/client/session/tab_control_feature.h ('k') | blimp/client/session/tab_control_feature_android.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: blimp/client/session/tab_control_feature.cc
diff --git a/blimp/client/session/tab_control_feature.cc b/blimp/client/session/tab_control_feature.cc
deleted file mode 100644
index b7b23cdf10b8b2eaae76a863f611661a7289c97e..0000000000000000000000000000000000000000
--- a/blimp/client/session/tab_control_feature.cc
+++ /dev/null
@@ -1,72 +0,0 @@
-// Copyright 2015 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "blimp/client/session/tab_control_feature.h"
-
-#include "blimp/common/create_blimp_message.h"
-#include "blimp/common/proto/blimp_message.pb.h"
-#include "blimp/common/proto/tab_control.pb.h"
-#include "blimp/net/blimp_message_processor.h"
-#include "net/base/net_errors.h"
-
-namespace blimp {
-namespace client {
-
-TabControlFeature::TabControlFeature() {}
-
-TabControlFeature::~TabControlFeature() {}
-
-void TabControlFeature::set_outgoing_message_processor(
- scoped_ptr<BlimpMessageProcessor> processor) {
- outgoing_message_processor_ = std::move(processor);
-}
-
-void TabControlFeature::SetSizeAndScale(const gfx::Size& size,
- float device_pixel_ratio) {
- if (last_size_ == size && last_device_pixel_ratio_ == device_pixel_ratio) {
- return;
- }
-
- last_size_ = size;
- last_device_pixel_ratio_ = device_pixel_ratio;
-
- SizeMessage* size_details;
- scoped_ptr<BlimpMessage> message = CreateBlimpMessage(&size_details);
- size_details->set_width(size.width());
- size_details->set_height(size.height());
- size_details->set_device_pixel_ratio(device_pixel_ratio);
-
- // TODO(dtrainor): Don't keep sending size events to the server. Wait for a
- // CompletionCallback to return before sending future size updates.
- outgoing_message_processor_->ProcessMessage(std::move(message),
- net::CompletionCallback());
-}
-
-void TabControlFeature::CreateTab(int tab_id) {
- TabControlMessage* tab_control;
- scoped_ptr<BlimpMessage> message = CreateBlimpMessage(&tab_control);
- tab_control->set_type(TabControlMessage::CREATE_TAB);
- outgoing_message_processor_->ProcessMessage(std::move(message),
- net::CompletionCallback());
-}
-
-void TabControlFeature::CloseTab(int tab_id) {
- TabControlMessage* tab_control;
- scoped_ptr<BlimpMessage> message = CreateBlimpMessage(&tab_control);
- tab_control->set_type(TabControlMessage::CLOSE_TAB);
- outgoing_message_processor_->ProcessMessage(std::move(message),
- net::CompletionCallback());
-}
-
-void TabControlFeature::ProcessMessage(
- scoped_ptr<BlimpMessage> message,
- const net::CompletionCallback& callback) {
- DCHECK(!callback.is_null());
- callback.Run(net::OK);
-
- NOTIMPLEMENTED();
-}
-
-} // namespace client
-} // namespace blimp
« no previous file with comments | « blimp/client/session/tab_control_feature.h ('k') | blimp/client/session/tab_control_feature_android.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698