OLD | NEW |
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 "mash/browser_driver/browser_driver_application_delegate.h" | 5 #include "mash/browser_driver/browser_driver_application_delegate.h" |
6 | 6 |
7 #include <stdint.h> | 7 #include <stdint.h> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "components/mus/public/cpp/event_matcher.h" | 10 #include "components/mus/public/cpp/event_matcher.h" |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 } // namespace | 45 } // namespace |
46 | 46 |
47 BrowserDriverApplicationDelegate::BrowserDriverApplicationDelegate() | 47 BrowserDriverApplicationDelegate::BrowserDriverApplicationDelegate() |
48 : connector_(nullptr), | 48 : connector_(nullptr), |
49 binding_(this) {} | 49 binding_(this) {} |
50 | 50 |
51 BrowserDriverApplicationDelegate::~BrowserDriverApplicationDelegate() {} | 51 BrowserDriverApplicationDelegate::~BrowserDriverApplicationDelegate() {} |
52 | 52 |
53 void BrowserDriverApplicationDelegate::Initialize(mojo::Connector* connector, | 53 void BrowserDriverApplicationDelegate::Initialize(mojo::Connector* connector, |
54 const std::string& url, | 54 const std::string& url, |
55 uint32_t id, | 55 const std::string& user_id, |
56 uint32_t user_id) { | 56 uint32_t id) { |
57 connector_ = connector; | 57 connector_ = connector; |
58 AddAccelerators(); | 58 AddAccelerators(); |
59 } | 59 } |
60 | 60 |
61 bool BrowserDriverApplicationDelegate::AcceptConnection( | 61 bool BrowserDriverApplicationDelegate::AcceptConnection( |
62 mojo::Connection* connection) { | 62 mojo::Connection* connection) { |
63 return true; | 63 return true; |
64 } | 64 } |
65 | 65 |
66 void BrowserDriverApplicationDelegate::OnAccelerator( | 66 void BrowserDriverApplicationDelegate::OnAccelerator( |
(...skipping 30 matching lines...) Expand all Loading... |
97 for (const AcceleratorSpec& spec : g_spec) { | 97 for (const AcceleratorSpec& spec : g_spec) { |
98 registrar->AddAccelerator( | 98 registrar->AddAccelerator( |
99 static_cast<uint32_t>(spec.id), | 99 static_cast<uint32_t>(spec.id), |
100 mus::CreateKeyMatcher(spec.keyboard_code, spec.event_flags), | 100 mus::CreateKeyMatcher(spec.keyboard_code, spec.event_flags), |
101 base::Bind(&AssertTrue)); | 101 base::Bind(&AssertTrue)); |
102 } | 102 } |
103 } | 103 } |
104 | 104 |
105 } // namespace browser_driver | 105 } // namespace browser_driver |
106 } // namespace main | 106 } // namespace main |
OLD | NEW |