summaryrefslogtreecommitdiffstats
path: root/chrome/browser/views/frame/browser_extender.h
blob: 5d096e47ae88068055e83559e4e1f4baaea67221 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
// Copyright (c) 2009 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.

#ifndef CHROME_BROWSER_VIEWS_FRAME_BROWSER_EXTENDER_H_
#define CHROME_BROWSER_VIEWS_FRAME_BROWSER_EXTENDER_H_

#include "base/basictypes.h"
#include "gfx/rect.h"

class BrowserView;

// Note: This class is deprecated (but still in use)
// and will be removed in the near future.
//
// BrowserExtender adds chromeos specific features to BrowserView.
// The factory method |Create(BrowserView*)| creates different types
// of extender depending on the type of BrowserView and target platform.
// Please see browser/chromeos/browser_extenders.cc for ChromeOS extenders, and
// standard_extender.cc for Chrome browser.
class BrowserExtender {
 public:
  BrowserExtender()
      : can_close_(true) {
  }

  virtual ~BrowserExtender() {}

  // Tells if the browser can be closed.
  bool can_close() const {
    return can_close_;
  }

  // Specifies if the browser can be closed or not. This typically set
  // to false when the browser is being dragged.
  void set_can_close(bool b) {
    can_close_ = b;
  }

 private:
  // True if the browser can be closed. See set_can_close method for setails.
  bool can_close_;

  DISALLOW_COPY_AND_ASSIGN(BrowserExtender);
};

#endif  // CHROME_BROWSER_VIEWS_FRAME_BROWSER_EXTENDER_H_