Home | History | Annotate | Download | only in lib
      1 // Copyright 2014 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 #ifndef MOJO_SERVICES_PUBLIC_CPP_VIEW_MANAGER_LIB_VIEW_PRIVATE_H_
      6 #define MOJO_SERVICES_PUBLIC_CPP_VIEW_MANAGER_LIB_VIEW_PRIVATE_H_
      7 
      8 #include "base/basictypes.h"
      9 
     10 #include "mojo/services/public/cpp/view_manager/view.h"
     11 
     12 namespace mojo {
     13 namespace view_manager {
     14 
     15 class ViewPrivate {
     16  public:
     17   explicit ViewPrivate(View* view);
     18   ~ViewPrivate();
     19 
     20   static View* LocalCreate();
     21   void LocalDestroy() {
     22     view_->LocalDestroy();
     23   }
     24 
     25   void set_id(Id id) { view_->id_ = id; }
     26   void set_node(Node* node) { view_->node_ = node; }
     27 
     28   ViewManager* view_manager() { return view_->manager_; }
     29   void set_view_manager(ViewManager* manager) {
     30     view_->manager_ = manager;
     31   }
     32 
     33   ObserverList<ViewObserver>* observers() { return &view_->observers_; }
     34 
     35  private:
     36   View* view_;
     37 
     38   DISALLOW_COPY_AND_ASSIGN(ViewPrivate);
     39 };
     40 
     41 }  // namespace view_manager
     42 }  // namespace mojo
     43 
     44 #endif  // MOJO_SERVICES_PUBLIC_CPP_VIEW_MANAGER_LIB_VIEW_PRIVATE_H_
     45